Accessing function data in GUI
Show older comments
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 Comment
Walter Roberson
on 1 Nov 2011
http://matlab.wikia.com/wiki/FAQ#How_can_I_share_data_between_callback_functions_in_my_GUI.3F
Accepted Answer
More Answers (0)
Categories
Find more on Environment and Settings in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!