matlab GUIs
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
I have a main GUI from which I can open several sub GUIs. I need to write a code such that when I open the sub GUIs, first sub GUI should be closed when I open the second sub GUI but the main GUI should remain open. Can anyone help me out with the code?
0 comentarios
Respuesta aceptada
Jakob Sørensen
el 25 de Abr. de 2012
Hmm, maybe 'findobj' could work. I tried some code that seemed to work:
% Find all figures
list_of_figs = findobj('type','figure');
% The latest opened figure, should be in the end of the list.
sub_fig = list_of_figs(end);
% Close the figure
close(sub_fig);
Or you could open you sub GUI's using the same name for all of them (since you won't have more than one open at a time anyway), and then just use close(sub_fig_name).
0 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Graphics Object Identification en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!