フィルターのクリア

How can I enable a pop-up menu, by clicking a pushbutton in guide?

2 ビュー (過去 30 日間)
Raj Shankar
Raj Shankar 2012 年 12 月 11 日
I have two different pop-up menus for two different pushbutton events.
I need only one of those two pop up menus to be in the guide when its corresponding pushbutton is pressed.
To be in more detail, I have only one place which should be completely occupied by either only one pop up menu(after event occurred) or two pushbuttons (before event occurs). There are two pushbuttons, e.g. 1.Animals 2.Birds
If I click on 'Animals' pushbutton, then a pop-menu having a list of animal names should be displayed in the place where the pushbuttons are located.
And if I click on 'Birds' pushbutton, then a pop-up menu having a list of bird names should be displayed in the same place.
How can I do this? Help me.

採用された回答

Vishal Rane
Vishal Rane 2012 年 12 月 11 日
In the pushbutton callbacks for both buttons, set the list for the popupmenu with respective data i.e. either animals or birds list.
So now you have two different buttons populating different data into the same list.
  4 件のコメント
Vishal Rane
Vishal Rane 2012 年 12 月 11 日
編集済み: Vishal Rane 2012 年 12 月 11 日
In the pushbutton callbacks set popupmenu list as:
set(handles.popmenutag,'String',AnimalOrBirdList)
To toggle visibility use:
set(handles.componenttag,'Visible','on|off')
Raj Shankar
Raj Shankar 2012 年 12 月 11 日
Thank you, Mr.Vishal

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMigrate GUIDE Apps についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by