How to freeze a figure
5 次查看(过去 30 天)
显示 更早的评论
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
0 个评论
采纳的回答
Azzi Abdelmalek
2013-2-28
set(handles.yourobject,'enable','off')
2 个评论
Azzi Abdelmalek
2013-2-28
%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
2013-2-28
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.
更多回答(2 个)
Walter Roberson
2013-2-28
Create a modal figure; nothing else will be permitted to run until the modal figure is destroyed.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Migrate GUIDE Apps 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!