How to freeze a figure

9 visualizaciones (últimos 30 días)
Cédric Devivier
Cédric Devivier el 28 de Feb. de 2013
Dear all,
I am building a GUI and I would like to make all buttons and stuff inactive during computation. Is there any clever way of doing so? The current solution is to disable and then enable everything single control...
Thank you for your help, Cédric

Respuesta aceptada

Azzi Abdelmalek
Azzi Abdelmalek el 28 de Feb. de 2013
set(handles.yourobject,'enable','off')
  2 comentarios
Azzi Abdelmalek
Azzi Abdelmalek el 28 de Feb. de 2013
%or if you put all your button in a panel called for example uipanel1
ButtonsHandle = get(handles.uipanel1,'Children')
set(ButtonsHandle,'enable','off')
Walter Roberson
Walter Roberson el 28 de Feb. de 2013
Some of them might already be off, so you should extract their current state so that you can restore it afterwards.
Also, since uipanel can have children that are uipanel, just get()'ing the Children at one level is not generally sufficient.
You also need to cross-check whether Enable Off for a uibuttongroup disables all of the individual buttons.

Iniciar sesión para comentar.

Más respuestas (2)

Walter Roberson
Walter Roberson el 28 de Feb. de 2013
Create a modal figure; nothing else will be permitted to run until the modal figure is destroyed.

Cédric Devivier
Cédric Devivier el 28 de Feb. de 2013
Ok, that was my fear. For the moment, I'm setting the enable to off.

Categorías

Más información sobre Migrate GUIDE Apps en Help Center 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