Info

This question is closed. Reopen it to edit or answer.

Calling pushbutton call backs of different GUIs in a single or main GUI.

1 view (last 30 days)
I want to create a main GUI from where i can call push button call backs of sub GUIs. So that i can run/start all different processes at the same time.

Answers (1)

Walter Roberson
Walter Roberson on 31 Mar 2016
Provided the main routine can find the handle of the graphics object in the sub-gui, the main routine can trigger the Callback of the sub-gui (though getting gcbo to work correctly can be tricky; fortunately you do not often need that function.)
The main thing you need to be careful with in working with multiple GUIs is that if you used GUIDE to create the GUI, then each of them might be using a different "handles" structure. Making sure to fetch from and update the right "handles" structure can be a bit of a nuisance.
"So that i can run/start all different processes at the same time."
That can be a problem. You cannot have two different graphics callbacks executing at the same time. Suppose, for example, that one of the callbacks looped around getting data from a device, and another callback looped plotted data as it came in, then you could not have both of those running at the same time. The code would need to be designed so that at most one of the routines looped around, and the other routines were only invoked when there was something ready for them to do and did that one piece of work and then returned. Interrupting a loop to do a small bit of work is much easier to code in MATLAB than having two callbacks looping at the same time.

This question is closed.

Tags

Community Treasure Hunt

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

Start Hunting!