Matlab GUI - Tabgroup visibility - checkbox
Afficher commentaires plus anciens
Hi everyone, for a project in university i am creating a gui for an animation and i have a question.
I would like to activate and deactivate a tab group with a checkbox (by default it should be hidden).
During my research in the forum i came across the following:
(from Jorge Paloschi on 5 Jun 2020 at 16:41 - https://de.mathworks.com/matlabcentral/answers/355804-app-designer-tab-groups)
- 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."
But I dont understand how it works and i want to disable all by default. Could anybode help me pls?
1 commentaire
Adam Danz
le 18 Juin 2020
Are you trying to make the entire tab group not visible (which my answer does) or are you trying to control the visibility of each tab?
Réponse acceptée
Plus de réponses (1)
audrey b
le 18 Fév 2023
0 votes
Unrecognized property 'Visible' for class 'matlab.ui.container.Tab'. im facing for this error and ive no idea what am i doing wrong T.T pls help
function TabGroupSelectionChanged(app, event)
selectedTab = app.TabGroup.SelectedTab;
switch selectedTab
case app.Step1Tab
app.Step1Tab.Visible = 'on';
app.Step2Tab.Visible = 'off';
app.Step3Tab.Visible = 'off';
case app.Step2Tab
app.Step1Tab.Visible = 'off';
app.Step2Tab.Visible = 'on';
app.Step3Tab.Visible = 'off';
case app.Step3Tab
app.Step1Tab.Visible = 'off';
app.Step2Tab.Visible = 'off';
app.Step3Tab.Visible = 'on';
end
end
1 commentaire
Juan Andrés Martin
le 12 Avr 2023
Read the first sentence of the accepted answer: this feature is not supported from R2020a
Catégories
En savoir plus sur App Building dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

