RESET GUI

Hi All
I want to Reset my GUI AS a whole , with one pushbutton RESET ! Is this Possible??
Thanks

 Respuesta aceptada

Walter Roberson
Walter Roberson el 14 de Dic. de 2011

2 votos

set(findobj('style','pushbutton'), 'Value', 0);
set(findobj('style','edit'), 'String', {''});
set(findobj('style','text'), 'String', {''});
set(findobj('style','listbox'), 'String', {''}, 'Min', 0, 'Max', 1, 'Value', 1, 'ListBoxTop', 1);
delete(findobj('type','line','-or','type','patch','-or','type','barseries','-or','type','surface');
and so on.

Más respuestas (1)

Jan
Jan el 14 de Dic. de 2011

1 voto

Yes, it is possible. You just need a suiting callback function for the button. Without knowing any details, it is impossible to create a more detailed answer.
One of the many solutions is to let the callback close the figure and open a new one.

6 comentarios

Maryam Emad
Maryam Emad el 14 de Dic. de 2011
Sorry , Can you explain more !!
I'm Beginner :(
Dr. Seis
Dr. Seis el 14 de Dic. de 2011
A further modification to:
http://www.mathworks.com/matlabcentral/answers/23856-reset-button
Jan
Jan el 14 de Dic. de 2011
No, Maryam, it is your turn to explain more details.
Maryam Emad
Maryam Emad el 14 de Dic. de 2011
Mu GUI contains Edits , popups menu , lisbosxes
I tray to use this:
set(findobj(handles.figure1,'style','edit', '-or', 'style','popupmenu'),'string','')
But , only edit was Reset !
popup menu still as it !?
Walter Roberson
Walter Roberson el 14 de Dic. de 2011
Warning: popupmenu control requires a non-empty String
Control will not be rendered until all of its parameter values are valid
Maryam Emad
Maryam Emad el 14 de Dic. de 2011
Sorry, can u explain more :$

Iniciar sesión para comentar.

Categorías

Más información sobre App Building en Centro de ayuda y File Exchange.

Etiquetas

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by