How to freeze a figure
조회 수: 17 (최근 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!