Effacer les filtres
Effacer les filtres

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

148 vues (au cours des 30 derniers jours)
Please look at the attached picture and help me!

Réponse acceptée

Madeline Gardner
Madeline Gardner le 3 Juil 2018
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 commentaires
Abolfazl Nejatian
Abolfazl Nejatian le 11 Déc 2018
Thank you for sharing your code, it was really help full.
Maryam
Maryam le 23 Fév 2023
Thanks. It was really helpful for me.

Connectez-vous pour commenter.

Plus de réponses (2)

Anas  Akhtar
Anas Akhtar le 4 Mai 2021
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 commentaires

Connectez-vous pour commenter.


sow amadou
sow amadou le 23 Nov 2020
Thx

Catégories

En savoir plus sur Migrate GUIDE Apps dans Help Center et File Exchange

Produits


Version

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by