How to Set App Designer Drop Down and List Box Data types
15 ビュー (過去 30 日間)
古いコメントを表示
I've started a new question, as I am experiencing the same difficulty with Drop Down menus in App Designer. A previous answer suggested that I consult https://www.mathworks.com/help/matlab/ref/uilistbox.html#bui0qid, and so I did that. The referenced URL displays some code that is generated _ programmatically_ for UIFigures, even though the title of the URL page suggests that the process is the same for App Designer.
However, when I try to insert or edit any extra lines of code into script that is generated by App Designer [in the UIFigure "function createComponents(app)"], that is simply not allowed.
It does seem to me that the _ * only*_ way to make changes to any of the List Box Properties in App Designer is via the LIST BOX PROPERTIES dialog panel.
I have hacked at this for awhile now and I have included an attachment with markups and some comments. It is easy to see that in the first panel, the ItemsData is in the format * [0,25,40,100]* and this is recognized by the code as numerical.
If one enters the numerical Data you wish to associate with the Items simply as numbers within the App Designer dialog box, they appear in the code as ={'1', '2', '3', '4'}, and are treated as CHARACTERS.
If one instead enters the numerical Data you wish to associate with the Items as a string of numbers enclosed within square brackets =[ ...] via the App Designer LIST BOX PROPERTIES dialog box, both the square brackets _ and_ the data that they contain are all treated as CHARACTERS.
Given that you cannot edit the Code generated by App Designer, and are confined to using the LIST BOX PROPERTIES dialog box, only, _ How do you force App Designer to treat the values entered there as double-precision Numerical (Scalar) quantities?_
0 件のコメント
採用された回答
Chris Portal
2018 年 5 月 20 日
See the answer thread for the following post on how to address this:
0 件のコメント
その他の回答 (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!