how to reset and reload app in AppDesigner
26 ビュー (過去 30 日間)
古いコメントを表示
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 件のコメント
Sai Teja G
2024 年 2 月 19 日
Can you check this out - https://www.mathworks.com/matlabcentral/answers/519702-app-designer-how-to-startup-within-the-app
回答 (1 件)
Ishaan Mehta
2024 年 12 月 26 日
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 件のコメント
参考
カテゴリ
Help Center および File Exchange で Develop Apps Using App Designer についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!