Accessing another GUI's objects from a GUI
1 次查看(过去 30 天)
显示 更早的评论
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 个评论
回答(1 个)
Paulo Silva
2011-8-12
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 个评论
另请参阅
类别
在 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!