フィルターのクリア

App Designer Drop Down "instructional" default value

15 ビュー (過去 30 日間)
Matt
Matt 2020 年 4 月 19 日
回答済み: Ganesh Regoti 2020 年 4 月 29 日
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?

回答 (1 件)

Ganesh Regoti
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!

カテゴリ

Help Center および File ExchangeDevelop Apps Using App Designer についてさらに検索

製品


リリース

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by