Accessing function data in GUI
古いコメントを表示
I'm new to creating GUIs, and am trying to construct something that seems on the basic side. However, I have some questions...
I'm trying to access a value that is stored inside a function. For example, I have a few toggle buttons. AFTER they are all set, I want to have code that will check the state of each, and perform an action based on these states when a push button is pressed. I'm not sure how to pass the toggle state values outside of their functions.
Another example I am having an issue with is loading a file and using the filename outside of the function. When I load the file using a push button and uigetfile, the name and path should be stored. How can I access the filename string outside the function? I want to set the filename string as the name of another toggle button.
1 件のコメント
Walter Roberson
2011 年 11 月 1 日
http://matlab.wikia.com/wiki/FAQ#How_can_I_share_data_between_callback_functions_in_my_GUI.3F
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Environment and Settings についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!