フィルターのクリア

How do I save state in app designer?

30 ビュー (過去 30 日間)
Jonathan Wong
Jonathan Wong 2017 年 1 月 15 日
編集済み: Edward 2018 年 4 月 9 日
How do I save the state in app designer?
In other words, how do I save and restore the last value of a numeric field when opening an app made in app designer?

回答 (1 件)

Jonathan Kwang
Jonathan Kwang 2017 年 1 月 23 日
One way to do this is the following:
  1. Save the value in a "CloseRequestFcn" callback function for you app to a MAT file: https://www.mathworks.com/help/matlab/ref/uifigureappdesigner-properties.html#property_CloseRequestFcn
  2. In the app's "StartupFcn" callback function, load the value from the MAT file and set the numeric field with this value. The documentation for App Designer's startup callback function can be found at the following link: https://www.mathworks.com/help/matlab/creating_guis/app-designer-startup-function.html
  1 件のコメント
Edward
Edward 2018 年 4 月 9 日
編集済み: Edward 2018 年 4 月 9 日

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeDevelop Apps Using App Designer についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by