How to make invisible popupmenu?

2 views (last 30 days)
i have 4 popupmenu and when i select a value from first one, according to choise except one of them will be visible and the others will be invisible. For example, from first popupmenu i select popupmenu2, then i want just popupmenu2 will be visible and the others will be invisible. Thank you.

Accepted Answer

Walter Roberson
Walter Roberson on 23 Dec 2015
function YourGUI_popup1_callback(hObject, event, handles)
choice = get(hObject, 'Value');
popups = [handles.popup2, handles.popup3, handles.popup4];
set(popups, 'Visible', 'off');
set(popups(choice), 'Visible', 'on');
  3 Comments
Walter Roberson
Walter Roberson on 23 Dec 2015
Your String for your popup1 should be a cell array of three entries, the first being the wording for activating popup2, the second for activating popup3, the third for activating popup4. Based upon your explanation I can tell you have an extra first entry before those. If I am correct then you need to indicate what you want to happen when the first entry of popup1 is chosen.
mete polat
mete polat on 23 Dec 2015
Thank you Walter Roberson it s working anymore.

Sign in to comment.

More Answers (0)

Categories

Find more on App Building in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!