How can I enable a button after another button's procedure has completed in App Designer?

I am looking for an example that shows two things:
1. How to show an app is busy while computing something
2. How to enable a button after that computation is done

 Akzeptierte Antwort

Attached is a simple app that accomplishes this as an example. The relevant code is in the first button's callback:
function computeFunction(app, event)
set(app.NotComputingLabel, 'Text', 'Computing...')
% your computation
pause(3);
set(app.NotComputingLabel, 'Text', 'Done Computing!')
set(app.AccessibleAfterComputeButton, 'Enable', 'on')
end
You can set the second button to be disabled by selecting it in the Design View and changing the "Enable" property on the right, in the "Button Properties" section.

Weitere Antworten (0)

Kategorien

Mehr zu Develop Apps Using App Designer finden Sie in Hilfe-Center und File Exchange

Produkte

Version

R2017a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by