How can I minimize other GUI's running when my main figure (GUI) is minimized.?
Show older comments
I have a Main figure that starts up other GUI's when an event occurs. At times I may have as many as 8 other GUI's running in the background. When I minimize my main figure, I want all the other GUI's to be minimized as well. When I maximize my main figure, then I want all the minimized GUI's to re-appear.
Also, when my 8 GUI's are minimized on the Windows Taskbar, I cannot distinguish which GUI is which, because the names are not distinguishable on the taskbar. How can I make the figure use distinct names so I can easily identify which GUI is minimized.
This is very important because I may have multiple(5) instances of the same executable program running concurrently. This may sound crazy, but it is the way this plotting program is used by other users. I have had users running as many as 10 instances of the same executable on a single computer. It is a requirement for the environment that I am using.
I realize that performance decreases tremendously, but money too tight for Parallel Computing toolbox or distributed computing processing options.
Thanks for any help on resolving this.
2 Comments
Tommie Heard
on 25 Jan 2013
Edited: Jan
on 28 Jan 2013
Jan
on 28 Jan 2013
But this is the callback of the main figure already: It is triggered, when I hit the minimize button of the figure. What are ou looking for instead?
Answers (1)
You need:
- A unique name for the GUI: No problem actually. Simply decide for a name and set it by set(FigureHandle, 'Name', 'GUI XY', 'NumberTitle', 'off')
- A list of related sub-GUIs: Whenever a sub-GUI is opened, store its handle in a list in the main GUI. Add the unique identificator from the main GUI to the name of the sub-GUI also.
- A callback when the main GUI is minimized:
jFig = get(handle(hFig), 'JavaFrame');
jAxis = jFig.getAxisComponent;
set(jAxis, 'MinimizedCallback', {@myMatlabFunc, hFig});
This is guessed only. See methods(jAxis) to find the correct name of the callback.
- A function to minimize figures programmatically, e.g. FEX: WindowAPI or an equivalent Java method.
Categories
Find more on Graphics Objects in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!