How can uicontrol be used to make an editable dropdown (eg combobox) control?
14 ビュー (過去 30 日間)
古いコメントを表示
I'd like to use the uicontrol of matlab and its arguments rather than the uidropdown. But I want the uidropdown functionality of having a popup menu of items that can be programmatically populated, but also the flexibility of allowing the user to define their own input value as well as the convenience of selecting from a list of values. Can this be done?
0 件のコメント
採用された回答
Walter Roberson
2020 年 1 月 16 日
Only if you use a uicontrol style 'edit' together with the uicontrol style listbox . The primary value would be held in the edit uicontrol; the callbacks for the listbox would set the content of the edit uicontrol String property.
2 件のコメント
Walter Roberson
2020 年 1 月 16 日
The Property Inspector provides an interface for editing the list box String property, but it is not exactly convenient.
その他の回答 (1 件)
Art
2020 年 1 月 28 日
Just ran across this link while searching the same thing... there appears to be an editable property. I havent tried it yet but it looks like what you want:
https://www.mathworks.com/help/matlab/ref/uidropdown.html
1 件のコメント
Art
2020 年 1 月 28 日
Sorry... skipped over the first part of your question : "...use the uicontrol of matlab and its arguments rather than the uidropdown". Nevermind!
参考
カテゴリ
Help Center および File Exchange で Migrate GUIDE Apps についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!