how to reset and reload app in AppDesigner
23 views (last 30 days)
Show older comments
I click on Button "Avvio Predator" and it load app..
Inside in my app i want to reset and reload it..
How can i do it?
i try o call this function to reset it :
function ResetTableButtonPushed(app, event)
app.startupFcn(app);
end
but it give me error
1 Comment
Sai Teja G
on 19 Feb 2024
Can you check this out - https://www.mathworks.com/matlabcentral/answers/519702-app-designer-how-to-startup-within-the-app
Answers (1)
Ishaan Mehta
on 26 Dec 2024
Hi Trop,
One of the ways to implement a restart functionality in MATLAB App Designer absed application is to delete "app.UIFigure", and then call the app again.
For instance, if you application's name is "SampleApp", you can add a "Button" element in the user interface and a dd a "ButtonPushedFcn" callback to it, when is executed when the button is clicked. "ButtonPushedFcn" can hve the following content:
% Button pushed function: RestartButton
function RestartButtonPushed(app, event)
delete(app.UIFigure);
SampleApp;
end
Now, The app will be restarted when the user clicks on the button.
Hope this helps!
0 Comments
See Also
Categories
Find more on Develop Apps Using App Designer in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!