How to reset popupmenu in GUI

조회 수: 2 (최근 30일)
Ean Soo
Ean Soo 2011년 3월 19일
Hie guys, can i know how to reset popupmenu to the string that we give it a name?
regards, Ean
  댓글 수: 2
Oleg Komarov
Oleg Komarov 2011년 3월 19일
I don't understand your question.
Ean Soo
Ean Soo 2011년 3월 19일
I just want to know how to reset popupmenu. Let's say the popupmenu string i give it a string name call AXIS.
In my GUI, it will automatically update the popupmenu according to my excel column. So i just want to know, how can i clear it all. Do you get me?

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

답변 (2개)

Jan
Jan 2011년 3월 19일
It is still not getting clear to me. You have a popupmenu. What is "give it a string name"? and what does "clear it all" mean? Do you want to set the 'String' or the 'Value' property?
popH = uicontrol('Style', 'popupmenu', ...
'String', {'1', '2', '3'});
pause(1);
set(popH, 'Value', 2);
pause(1);
set(popH, 'Value', 1, 'String', {'new'});
pause(1);
Does this help??

Walter Roberson
Walter Roberson 2011년 3월 19일
What you want to do is not possible, as it is not possible to give a popup menu a name at all. You can assign the handle of the popup menu to a variable, and you can assign a Tag to the popup menu, and you can change the contents of the pop-up menu by changing its String property -- but you cannot give it a name.
  댓글 수: 1
Oleg Komarov
Oleg Komarov 2011년 3월 19일
Well, you can always call it Betsy or Jimmy, but that would remain within the depths of your heart :).

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

카테고리

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