I want to change/switch between the tabs in the GUI (App Designer) when i press the button?

167 ビュー (過去 30 日間)
Please look at the attached picture and help me!

採用された回答

Madeline Gardner
Madeline Gardner 2018 年 7 月 3 日
Hello!
Add a callback to the button that contains the code
app.TabGroup.SelectedTab = app.InputsTab;
You may need to change the variable names based on what you have in your code, but this should let the button control the active tab.
Hope that helps!
  5 件のコメント
Abolfazl Nejatian
Abolfazl Nejatian 2018 年 12 月 11 日
Thank you for sharing your code, it was really help full.
Maryam
Maryam 2023 年 2 月 23 日
Thanks. It was really helpful for me.

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

その他の回答 (2 件)

Anas  Akhtar
Anas Akhtar 2021 年 5 月 4 日
For further clarification to the answer given by Madeline Gardner:
app.TabGroup.SelectedTab = app.InputsTab;
In the above code, the "SelectedTab" should not be changed to the name of your current tab where your 'button' is situated. You should only change the "InputsTab" with the name of the tab that you want to switch to, when you push the button.
P.S. I am adding this clarification because as a beginner in MATLAB, I struggled for two hours due to this small confusion.
Regards,
Akhtar.
  3 件のコメント
Mehdi Dehghan
Mehdi Dehghan 2023 年 7 月 21 日
Thank you
It solved my problem.

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


sow amadou
sow amadou 2020 年 11 月 23 日
Thx

カテゴリ

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

製品


リリース

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by