Communication between two or more GUIs

조회 수: 2 (최근 30일)
Letizia
Letizia 2014년 7월 29일
편집: John 2014년 7월 29일
I've a GUI(i.e. lets call it 'First')through which i can choose to open other GUIs(let's call them 'Second' and 'Third').I want to put a 'pushbutton' on the 'First'GUI that allows me to manipulate the figure on the different axes of the 'Second' and 'Third' GUIs. So, i choose with the 'First'GUI if use either 'Second' or 'Third' GUI; once i've chosen that i start to work just with the GUI that i chose (so the Third one or Second ones). Now i want to have a pushbutton not on each GUIs (Second or Third) but only on the First one in order to manipulate the figure on the axes 1 of the Second or Third (depends on which one i've previously chosen). Furthermore this pushbutton that i want is optional and i need to refresh my axes after used that. I've done my best to explain the situation,please if you know any solution help me out!!Thank yo so much!!

답변 (1개)

John
John 2014년 7월 29일
편집: John 2014년 7월 29일
Good morning/afternoon/evening. There are a couple of ways to go about doing what you want to do. Which way is the path of least resistance will depend on how complex the forms 'SecondGUI' and 'ThirdGUI' are.
If 'SecondGUI' and 'ThirdGUI' are merely pop up figures intended to display axes whose display properties will be manipulated from the 'FirstGUI' then you might just consider programmatically creating 'SecondGUI' 'ThirdGUI' figures and using the handles to those figures (which are returned as part of the call to figure) to manipulate the view of the axes.
You can design 'SecondGUI' and 'ThirdGUI' with GUIDE (<http://www.mathworks.com/discovery/matlab-gui.html)>, obtain the code behind file with the callbacks, and instantiate SecondGUI and ThirdGUI by calling the those code behinds and getting any handles to the controls within SecondGUI and ThirdGUI. Then manipulate the display of any axes in there by obtaining handles to the axes and setting their properties.
The official MATLAB GUI user guide (<http://www.mathworks.com/help/pdf_doc/matlab/buildgui.pdf>) contains all you need to know.

카테고리

Help CenterFile Exchange에서 Interactive Control and Callbacks에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by