App Designer Drop Down "instructional" default value
11 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Is there a way to have the drop down component default to some instructional/non-functional value that forces users to select an option? I want something that tells the user to select something but while it is in that "instructional" state, the menu stays in some non-functional state, for lack of a better term. I'm thinking something like making the first option be "Select a month" with the subsequent options being the 12 months. Does MATLAB have a built-in method of handling this or would you have to monitor everything yourself by putting an if/else statement somewhere to check the value to ensure when you go to perform an operation that it is not still "Select a month?" Do you have to modify the "Items," "ItemsData," and/or "Value" arguments in a certain way?
0 Kommentare
Antworten (1)
Ganesh Regoti
am 29 Apr. 2020
Hi,
I assume that you are expecting a built-in feature for instructional default value. But as per my knowledge, there is no such feature available as of now. But you can customize it in different ways
Method 1 : During valudation you can check the value of the dropdown element, and if the value is default value then you can throw an error stating "select other values".
Method 2 : You can use ItemData argument to specify the indices of items in the list. During validation, you can check if the selected element index is default then throw an error.
Here is the link which you can refer to
Hope this helps!
0 Kommentare
Siehe auch
Kategorien
Mehr zu Develop Apps Using App Designer finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!