popupmenu in GUI

25 views (last 30 days)
Andy
Andy on 25 Jan 2012
Answered: beginner94 on 31 Jan 2018
I made a popupmenu in GUI, but how do i populate the popup with choices? thanks

Accepted Answer

Sean de Wolski
Sean de Wolski on 25 Jan 2012
Press return in the string option in GUIDE to start new lines.
Programatically, use a cellarray of strings for the string option:
uicontrol('style','popup','string',{'option 1';'hello world';'Is it Friday yet?'})

More Answers (2)

Dr. Seis
Dr. Seis on 25 Jan 2012
temp_cellstr = {'choice 1';'choice 2';'choice 3'};
set(handles.your_popup_name,'String',temp_cellstr);
Or you can open the "Property Inspector" inside GUIDE and manually change the String values there.
  2 Comments
Andy
Andy on 25 Jan 2012
but in property inspector i can only change 1 value, doesnt let me add more
Dr. Seis
Dr. Seis on 25 Jan 2012
You can... you just need to click the list icon next to the edit dialog

Sign in to comment.


beginner94
beginner94 on 31 Jan 2018
How can I connect the values I added to the popupmenu with their files? They are configfiles in this case, so no m files.

Categories

Find more on Migrate GUIDE Apps in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!