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!