Appdesigner button disable not working when called in side pushbutton callback
조회 수: 6 (최근 30일)
이전 댓글 표시
Hello. I have a pushbutton that I want to prevent the user from pushing agin until the current code has finished.
So I did this
function GetSpectraButtonPushed(app, event)
app.GetSpectraButton.Enable='off') % Disable any further presses of the button
% .. do stuff
app.GetSpectraButton.Enable='on') % Enable button
But its having no effect?
댓글 수: 0
채택된 답변
Ameer Hamza
2020년 11월 14일
Use drawnow to force the figure to update
app.GetSpectraButton.Enable='off'
drawnow;
% .. do stuff
app.GetSpectraButton.Enable='on'
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Interactive Control and Callbacks에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!