How can I create two list dialogs (listdlg) in one figure?

13 ビュー (過去 30 日間)
Matthias Stangl
Matthias Stangl 2016 年 9 月 26 日
回答済み: Matthias Stangl 2016 年 9 月 26 日
Hi all! I am looking for a solution to create a figure, in which two different listboxes are presented, and the user can select one or multiple lines in each listbox. I know that I could program this more or less from scratch, using GUIDE. However, I was wondering whether there would be a simpler solution, using the the function 'listdlg'? Because listdlg actually does everything I need, beside that it just allows one but not multiple listboxes.
An example for a listbox would be the following:
listdlg('PromptString','List options A:', 'ListString', {'option 1A', 'option 2A', 'option 3A'})
So I would need a figure that looks exactly like this, but just with another listbox next to it:
listdlg('PromptString','List options B:', 'ListString', {'option 1B', 'option 2B', 'option 3B'})
So that the user can select 1 or multiple lines from listbox A and 1 or multiple lines from listbox B.
Best, Matthias

採用された回答

Walter Roberson
Walter Roberson 2016 年 9 月 26 日
No, listdlg() creates a temporary figure with windowstyle 'modal' (which disallows operating on other figures)
I also see that in current versions, listdlg() stores some data in appdata ListDialogAppData__ against the root graphics object; if there were multiple list dialogs they would be conflicting on that.

その他の回答 (1 件)

Matthias Stangl
Matthias Stangl 2016 年 9 月 26 日
Ok, thanks for the quick reply. Then I will create a new dialog with GUIDE.

カテゴリ

Help Center および File ExchangeMigrate GUIDE Apps についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by