How can I create two list dialogs (listdlg) in one figure?
13 views (last 30 days)
Show older comments
Matthias Stangl
on 26 Sep 2016
Answered: Matthias Stangl
on 26 Sep 2016
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
0 Comments
Accepted Answer
Walter Roberson
on 26 Sep 2016
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.
0 Comments
More Answers (1)
See Also
Categories
Find more on Migrate GUIDE Apps in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!