How to change the GUI content when selecting different menu buttons?
Show older comments
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
2 Comments
Romano Geerling
on 15 Nov 2016
To give a simple answer, yes you can.
However creating a GUI like this requires you to put all the controls into a uipanel and set the visibility to on and off when the user selects something from the menu. Does the menu only contains 3 options, then it might not be such a big issue.
If you create much more options the code is maybe harder to read and maintain and the performance might go down. Although you set the visibility of the uipanel to off all the code will still be executed by MATLAB.
Alon Rozen
on 16 Nov 2016
Accepted Answer
More Answers (0)
Categories
Find more on Startup and Shutdown 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!