Info

此问题已关闭。 请重新打开它进行编辑或回答。

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

1 次查看(过去 30 天)
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.

回答(1 个)

Walter Roberson
Walter Roberson 2016-3-31
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.

此问题已关闭。

标签

Community Treasure Hunt

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

Start Hunting!

Translated by