I was interested in trying to break up my GUI app in to a set of smaller GUIs, all made in app creator, but using only a single app window and allowing the user to switch between them. I made a parent app with a button that when pressed started a second app containing a panel. The second app has a startup function that sets the parent of the panel to the figure window of the first app, which behaves as expected, but the second app window is still present. So then I added another line in the start up function to set its own uifigure to invisible:
function startupFcn(app, parent)
app.Panel.Parent = parent;
app.UIFigure.Visible = false;
end
The argument 'parent' is the UIFigure from the first app.
This seems to work as expected, but what happens to the instance of app 2? The figure window is invisible, but it seems the app is still running. If so can it be closed without making it visible to user? What happens to its instance if I close the first app? Can I delete the instance from either app?
5 Comments
Direct link to this comment
https://in.mathworks.com/matlabcentral/answers/568293-setting-a-matlab-gui-apps-main-figure-to-invisble#comment_944568
Direct link to this comment
https://in.mathworks.com/matlabcentral/answers/568293-setting-a-matlab-gui-apps-main-figure-to-invisble#comment_944568
Direct link to this comment
https://in.mathworks.com/matlabcentral/answers/568293-setting-a-matlab-gui-apps-main-figure-to-invisble#comment_944646
Direct link to this comment
https://in.mathworks.com/matlabcentral/answers/568293-setting-a-matlab-gui-apps-main-figure-to-invisble#comment_944646
Direct link to this comment
https://in.mathworks.com/matlabcentral/answers/568293-setting-a-matlab-gui-apps-main-figure-to-invisble#comment_944724
Direct link to this comment
https://in.mathworks.com/matlabcentral/answers/568293-setting-a-matlab-gui-apps-main-figure-to-invisble#comment_944724
Direct link to this comment
https://in.mathworks.com/matlabcentral/answers/568293-setting-a-matlab-gui-apps-main-figure-to-invisble#comment_944763
Direct link to this comment
https://in.mathworks.com/matlabcentral/answers/568293-setting-a-matlab-gui-apps-main-figure-to-invisble#comment_944763
Direct link to this comment
https://in.mathworks.com/matlabcentral/answers/568293-setting-a-matlab-gui-apps-main-figure-to-invisble#comment_944799
Direct link to this comment
https://in.mathworks.com/matlabcentral/answers/568293-setting-a-matlab-gui-apps-main-figure-to-invisble#comment_944799
Sign in to comment.