Appdesigner button disable not working when called in side pushbutton callback
10 次查看(过去 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!