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

조회 수: 9 (최근 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 CenterFile Exchange에서 App Building에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by