How to control GUI data from anther GUI?

1 次查看(过去 30 天)
By using GUIDE toolbox I have made two GUI in matlab. I want to control a image in an axes of GUI1 by using a slider GUI2. How is it possible? How can I pass the value of slider in GUI2 to axes of GUI2? Thanks

采纳的回答

Walter Roberson
Walter Roberson 2016-1-10
If the object from the other GUI has a unique Tag then you can findobj() based on the Tag . Or in case the object has only callback visibility then findall() instead of findobj(). GUIDE allows you to change the Tag of an object.
If the object does not have a unique Tag then you need a way of finding some graphics object that belongs to the other GUI -- such as if the first GUI passed its figure number to the second GUI when it started the second GUI. If you can find some graphics object from the other GUI then you can ancestor() to find its figure. Then you can call guidata() passing in that figure identifier, which will return back the handles structure that belongs to that GUI; you can then extract the appropriate handle from that handles structure.

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Migrate GUIDE Apps 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by