MATLAB: How to change the GUI content when selecting different menu buttons

change of contentguiguidemenu buttons

Hi all,
Using GUIDE, I am developing a GUI which controls 3 different aspects of analysis work: input data, presentations and analysis.
I want to have three menu buttons for each of these (I know how to add menu buttons to a GUI). I want that each time a menu button is selected all the content of the main GUI figure – all the controls that the user see – will change. Much like the behavior of apps on a smartphone.
I know that I can create some buttons on the main GUI that, when being pushed, will open another GUI which will do the job. However, I want the more 'sexy' way of having to work with only one GUI.
Is there a way to do it?
Thanks, Alon

Best Answer

You can do this programmatically quite easily. You can also do it in GUIDE with a little bit of programmatic addition, it is just a bit messy.
Basically you would need to put 3 panels on top of each other (using the object browser or 'send to back' option on the top panel) in GUIDE, with the functionality of each of your different GUIs in.
Then it is just a matter of making the other panels invisible and the one you want visible in response to the menu changing.
Related Question