Using a main GUI window to open new ones
14 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
I wrote a .fig file's name into button's callback funtion. When I click a button, a new GUI is opening and it's being 2 windows , when I click another button, another GUI is opening , and it's being 3 windows on the screen. But I don't want multiple windows on the screen. I want to use one main window and open my GUIs' on that main window. How can I do that.(By the way I'm creating my GUIs'with GUIDE not with code)
Thanks in advance.
0 Commenti
Risposte (2)
Geoff Hayes
il 21 Dic 2014
Mahbube - if you are launching a second GUI from the first, via a pushbutton callback in the first GUI, then just close the first one. Try something like
function pushbutton1_Callback(hObject, eventdata, handles)
% launch your other GUI
% close the current GUI
close(handles.figure1);
The above assumes that the figure object of the first GUI is named/tagged as figure1. You can also close it by using/calling the name of the GUI, but the other way makes it clear exactly which figure/GUI that you are closing.
Try the above and see what happens!
2 Commenti
Joseph Cheng
il 22 Dic 2014
Modificato: Joseph Cheng
il 22 Dic 2014
What you could do is work with panels. i attached an example. I didn't have much time to comment it fully but it boils down to creating your different GUIs in panels and then shuffling them around depending on the button pressed.
- During opening function record position of all the panels
- save which one is the active panel
- limit the view to just the panel
- depending on which button was pressed swap the positions of the active panel with the desired.
0 Commenti
Vedere anche
Categorie
Scopri di più su Migrate GUIDE Apps in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!