- 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
- 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
How do I save state in app designer?
조회 수: 20 (최근 30일)
이전 댓글 표시
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?
댓글 수: 0
답변 (1개)
Jonathan Kwang
2017년 1월 23일
One way to do this is the following:
댓글 수: 1
Edward
2018년 4월 9일
편집: Edward
2018년 4월 9일
The link for item 1 above is broken. TMW gave me this one instead: https://www.mathworks.com/help/matlab/ref/matlab.ui.figureappd-properties.html#bu4i700-1-CloseRequestFcn
참고 항목
카테고리
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!