Accessing another GUI's objects from a GUI
11 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
I tried making the title a little less circuitous sounding but couldn't.
So I have a main GUI that has an initializing function that creates an instance of an object that is pretty much the meat and potatoes of the whole program. Then I have other smaller GUIs like wizard windows where the user enters data that defines that object i mentioned earlier.
My question is, how can I access a property of that object that sits in the main GUIfrom the other smaller data entry GUIs?
0 commentaires
Réponses (1)
Paulo Silva
le 12 Août 2011
One easy way is to tag objects, for example if you have one slider in one GUI and you want it to be easy to find by other GUI do this
%on the GUI that contains the slider do this
set(h,'tag','sliderGUI1') %where h is the handle of the slider
%on another GUI you want to get the slider properties
h=findall(0,'tag','sliderGUI1');
%Now you can do things like getting the value get(h,'Value')
0 commentaires
Voir également
Catégories
En savoir plus sur Data Import and Analysis dans Help Center et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!