popupmenu in GUI

조회 수: 24 (최근 30일)
Andy
Andy 2012년 1월 25일
답변: beginner94 2018년 1월 31일
I made a popupmenu in GUI, but how do i populate the popup with choices? thanks

채택된 답변

Sean de Wolski
Sean de Wolski 2012년 1월 25일
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?'})

추가 답변 (2개)

Dr. Seis
Dr. Seis 2012년 1월 25일
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
Andy
Andy 2012년 1월 25일
but in property inspector i can only change 1 value, doesnt let me add more
Dr. Seis
Dr. Seis 2012년 1월 25일
You can... you just need to click the list icon next to the edit dialog

댓글을 달려면 로그인하십시오.


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

카테고리

Help CenterFile Exchange에서 Migrate GUIDE Apps에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by