App Designer Drop Down "instructional" default value
11 次查看(过去 30 天)
显示 更早的评论
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 个评论
回答(1 个)
Ganesh Regoti
2020-4-29
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 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Develop Apps Using App Designer 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!