App Designer Tab Groups
Ältere Kommentare anzeigen
Hi,
I am trying to make an app with multiple tabs and I am experiencing some difficulty. How do you turn Tabs on and off in app designer? I attempted using the following code:
app.Tab.HandleVisibility='off';
However, nothing happened. The tab still appears when I run the code.
Thanks,
April
2 Kommentare
Adam Danz
am 6 Feb. 2023
I'm not quite sure what you're asking. Consider asking a new question since the topic appears to differ from this thread.
Akzeptierte Antwort
Weitere Antworten (3)
Jorge Paloschi
am 5 Jun. 2020
Another way of doing it:
- Create a dummy
tg = matlab.ui.container.TabGroup;
- Suppose your tab is in index 2, then do
app.TabGroup.Children(2).Parent = tg;
- After this the tab is not visible anymore
- To make it visible again do the opposite
tg.Children(1).Parent = app.TabGroup;
- The only remaining action is to permute the children of app.TabGroup so that the last Children goes back to index 2, and voila, visible again in the right order!
You might have to change the property name TabGroup to the one in your application if it is not the default Property name.
6 Kommentare
Philipp G.
am 18 Jun. 2020
Awesome!
Could you tell me pls how i can disable different Tabs by default?
I try to activate different tabs from a tab group by checkbox.

Jorge Paloschi
am 22 Jun. 2020
Create a dummy TabGroup and parent in that tab group all the tabs that you want disabled. Then as you click on the check box to enable a tab, you move the respective tab from the dummy to your gui (in the right position), and viceversa if you want it disabled.
Catteau Ophélie
am 17 Aug. 2020
have you got succeed ? if yes, can I see your code please ?
Vijay KG
am 26 Aug. 2020

@jorge paloschi: with a single tab, your solution was able to hide the tab. but if i have multiple tab, not able to fix it. could you please help on multiple tabs? Thanks.
ClaytonA
am 9 Apr. 2021
Thanks.
This is way harder than it should be. Why isn't there a Visibility property?
Melissa Williams
am 16 Okt. 2017
2 Stimmen
If you want to show and hide the tabs as the user interacts with your app, one way to do this is to add a second TabGroup and set its visibility to off. When you want to hide a tab, set it's parent to the second, hidden tab group, app.Tab.Parent = app.TabGroup2. When you want to show it again, set it back to the visible tab group, app.Tab.Parent = app.TabGroup.
1 Kommentar
Dominik Müller
am 4 Dez. 2020
Okay this is a way to show / hide tabs. But if I do so and switch between the tabs all items on the tab are hidden. What am I doing wrong? And how to fix this?
Elizabeth Reese
am 11 Sep. 2017
If you want to change which tab in a group is visible, you can use:
app.TabGroup.SelectedTab = app.Tab1
where Tab1 is a tab in the group.
If you want the entire tab group to disappear from the screen, you can use:
app.TabGroup.Visible = 'off'
1 Kommentar
April Bryan
am 11 Sep. 2017
Kategorien
Mehr zu Develop Apps Using App Designer finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
