MATLAB: How to make invisible popupmenu

invisible popupmenu

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.

Best Answer

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');