How to access appdesigner uicontrol input validation such as seen on NumericEditField?

3 ビュー (過去 30 日間)
A Mackie
A Mackie 2018 年 2 月 16 日
編集済み: Greg 2018 年 2 月 19 日
The ui control NumericEditField has 'built-in' validation when the limits are enabled, preventing the user from entering a number outwith these limits and displaying a popup tote if attempted. Is it possible to manipulate this validation that MATLAB carries out? Ideally I would like to be able to implement this on both numeric and text field boxes, for example to enable a EditField control to only accept hex input, and in the event of a non hex character being enabled the dialog tote would appear informing the user to only enter hex characters. This should not trigger the value changed callback á la the NumericEditField case.
  3 件のコメント
A Mackie
A Mackie 2018 年 2 月 19 日
Greg, thank you for your input. Its useful to be able to 'abort' the change as you put it, but ideally I was hoping to be able to manipulate the popup tote I describe, such as to give the user feedback as to why their input has been reverted. If this isn't possible then I think your solution, coupled with a label informing the user of their 'mistake' is probably the best/easiest solution; although I was rather hoping to minimise the clutter in the ui.
Greg
Greg 2018 年 2 月 19 日
編集済み: Greg 2018 年 2 月 19 日
The new functions uialert and uiconfirm are a nice-ish way to mimic the "popup tote."

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeMigrate GUIDE Apps についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by