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

293 ビュー (過去 30 日間)
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 件のコメント
Nitin Phadkule
Nitin Phadkule 2021 年 6 月 16 日
you can insert hyperlink component and give adress of second app as input to hypertext component.

サインインしてコメントする。

採用された回答

Dennis
Dennis 2018 年 8 月 1 日
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 件のコメント
Francisco Pena
Francisco Pena 2021 年 6 月 19 日
app.UIFigure.Visible = 'off';
Isabelle Lorei
Isabelle Lorei 2022 年 5 月 24 日
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 :)

サインインしてコメントする。

その他の回答 (3 件)

RobF
RobF 2018 年 8 月 1 日
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 件のコメント
Theodor Middeldorf
Theodor Middeldorf 2018 年 8 月 1 日
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.

サインインしてコメントする。


Kristoffer Walker
Kristoffer Walker 2020 年 10 月 21 日

Trishia May
Trishia May 2022 年 11 月 28 日
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.

カテゴリ

Help Center および File ExchangeDevelop Apps Using App Designer についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by