I want to change/switch between the tabs in the GUI (App Designer) when i press the button?
157 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Abdul wadood Mohammed
el 30 de Jun. de 2018
Comentada: Miguel
el 11 de Jun. de 2024
Please look at the attached picture and help me!
Respuesta aceptada
Madeline Gardner
el 3 de Jul. de 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!
Más respuestas (2)
Anas Akhtar
el 4 de Mayo de 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 comentarios
Ver también
Categorías
Más información sobre Develop Apps Using App Designer en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!