App Designer: How to open a second GUI or a new window with panels, lamps, edit fields, etc. by a ButtonPush callback ?

Hey, I think my Problem sounds simple. But I am new to the matlab app designer.
I have an already existing GUI where I shall make some changes. When I click a button I want to open a second GUI or window. In that window I want to use some components of the component library.

1 Comment

you can insert hyperlink component and give adress of second app as input to hypertext component.

Sign in to comment.

 Accepted Answer

You can create a 2nd app with appdesigner and call it from your first app. Your callback should look like this:
function buttonPushed(app,event)
app2
end

12 Comments

Did you create app2 and is app2.mlapp on Matlabs's search path?
I want to close the app1 when the app2 is open, the command is ??
to close the app1, you can use this:
app.app1.Visible = 'off';
want to read the text filled of first GUI in second GUI, how to do this ?
Ganesh, can you be more specific? What text from first GUI? Where are you trying to paste it in the second GUI? Check out the documentation about sharing data between callbacks and other apps:
Hello,
I have my principal GUI and where I read some data and add some values to a table,
I would like to send part of the data to a second GUI to visualize one by one in a plot, create a double and send it back to the main GUI.
the idea would be GUI1-> GUI2 send a matrix and a table (m and t)
in GUI2 loop one by one the collumns of the matrix and when finish
GUI2-> GUI1 recover a vector
how can I could achive something like these? I saw the example of design appwith two apps but I dont understand a lot how to transfer de variables from one to the other...
thanks
How do i close the parent GUI that called the second GUI?
I created two apps. The second app is called from the first app (app2) und the first app turns unvisible (app.UIFigure.Visible = 'off').
My question: How to make the first app visible again?
I have already tried many ways (app1.UIFigure.Visible = 'on' or app.app1.UIFigure.Visible = 'on' or app1.Visible = 'on') but nothing works... Please help! :)
Reason why I want to make the first app visible again and do not want to open the app1 again:
I need to have the opportunity in app2 to go back to app1. That´s why I just want to make app1 unvisible and visible again :)

Sign in to comment.

More Answers (3)

Have you tried to create a button, its callback and modify the callback?
You could try
fig = figure();
assignin('base','fig',fig);
within the callback to create a new figure.

1 Comment

Yes, but i dont know how to save positions and Labels of the library components in the figure if it is creating itself everytime newly.

Sign in to comment.

Hi! I have the same issue here. I just want a new window to show some details, then have a button to back to main window. How can I dot it? I'm new in MatLab.

Categories

Find more on Develop Apps Using App Designer in Help Center and File Exchange

Products

Community Treasure Hunt

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

Start Hunting!