How to programmatically select a tab in a uitabgroup?
Afficher commentaires plus anciens
Is it possible to programmatically select one of the tabs in a uitabgroup? In response to a user request, I need to recreate the tabs and their contents, but I'd like to keep the original choice of tab. When the tabs are created, tab 1 is always selected.
tabgroup.SelectedTab is a read-only property; I tried writing to it (on the chance that it would work) and nothing happened.
Thanks!
Réponse acceptée
Plus de réponses (1)
Joseph Reynolds
le 13 Déc 2024
Modifié(e) : Joseph Reynolds
le 7 Jan 2025
0 votes
Matlab R2022a +/- some versions , You can use the Childeren of the TabGroup.
whith in an app there are two tabs in a given TabGroup, at the end of a function to go back to the first tab use the first index of the children, or the nth child if desired.
Syntax:
app.TabGroup.SelectedTab = app.TabGroup.Children(1);
For this example there are two tabs labeled:
- Set Environment
- Configure Environmen
>> app.TabGroup.Children
2×1 Tab array:
Tab (Set Environment)
Tab (Configure Environment)
Catégories
En savoir plus sur Software Development Tools dans Centre d'aide et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!