Bug in TabGroup appearance in AppDesigner (R2019b)
Mostrar comentarios más antiguos
I experience what I think is a bug of AppDesigner.
Consider a TabGroup_child inside a TabGroup_parent.
If the TabGroup_child is not in the first tab of TabGroup_parent, at startup the default tab of TabGroup_child doesn't appear as selected (highlighted) even if it actually is. A user click on another tab of TabGroup_child will correctly select it, and subsequently a click on the default tab will make it appear as selected.
This issue is not present if TabGroup_child is in the first tab of TabGroup_parent.
Respuestas (7)
Chidvi Modala
el 1 de Jul. de 2020
1 voto
This is a bug. I have brought this issue to the notice of our developers and will try to fix it in future releases.
1 comentario
Vincenzo
el 1 de Jul. de 2020
Philipp Boecker
el 22 de Nov. de 2020
1 voto
push
Chidvi Modala
el 12 de Jun. de 2020
0 votos
This looks like an expected behavior. When you first create TabGroup_parent, the highlighted region will be around the TabGroup_parent by default but not around TabGroup_Child because we selected the TabGroup_parent and the priority will be given to it. You can observe the following
- When you create a TabGroup_parent, since you are selecting the TabGroup_parent, the highlighted area is not around TabGroup_child but it is around the TabGroup_parent as shown below

- When you select either Tab1 or Tab 2, the highlighted region will be around the respective tabs as shown below

- When you again click on TabGroup_parent, the highlighted region will be around the entire Tabgroup.

1 comentario
Vincenzo
el 19 de Jun. de 2020
Vincenzo
el 23 de Jun. de 2020
0 votos
1 comentario
Edward Burdak
el 30 de Sept. de 2021
I too am experiencing the same issue - but I'm a greenhorn to all this APP designer so I may have finger problems
Taking note of Kim's reply below I attempted to shortcut by
app.TabGroup.SelectedTab = app.TabComponetBrowserName
The tab changes as expected in the container and the highlight on the tab switches correctly as expected for all tabs except the first tab in the group. For the fist tab the components are shown correctly but the "highlight" on the tabname is not set.
Kim Sander
el 9 de Sept. de 2020
I am experiencing the exact same issue.
Until the bug is fixed I am using a workaround.
% Creating external tab group
ExternelTabGroup = uitabgroup(app.UIFigure);
ExternelTabGroup.Position = [10, 10, 400, 400];
ExternalTab1 = uitab(ExternelTabGroup);
ExternalTab1.Title = 'Tab1';
ExternalTab2 = uitab(ExternelTabGroup);
ExternalTab2.Title = 'Tab2';
% Creating internal tab group 1
InternalTabGroup1 = uitabgroup(ExternalTab1);
InternalTab1A = uitab(InternalTabGroup1);
InternalTab1A.Title = 'Tab1A';
InternalTab1B = uitab(InternalTabGroup1);
InternalTab1B.Title = 'Tab1B';
InternalTab1C = uitab(InternalTabGroup1);
InternalTab1C.Title = 'Tab1C';
% Select tab 2 before creating its internal tab group
ExternelTabGroup.SelectedTab = ExternalTab2;
drawnow % Sometimes drawnow may be required
% Creating internal tab group 2
InternalTabGroup2 = uitabgroup(ExternalTab2);
InternalTab2A = uitab(InternalTabGroup2);
InternalTab2A.Title = 'Tab2A';
InternalTab2B = uitab(InternalTabGroup2);
InternalTab2B.Title = 'Tab2B';
InternalTab2C = uitab(InternalTabGroup2);
InternalTab2C.Title = 'Tab2C';
% Restore original tab selection
ExternelTabGroup.SelectedTab = ExternalTab1;
Peng Li
el 15 de Nov. de 2022
0 votos
Had the same issue in 2022a. I have worked out a temporal solution. What I did that can show the right selection was that in the StartupFcn of the App, you force the child tab group to select another tab (for example, the second one or the third one or anyone except the first one). And then, in the parent tab selection change callback, when you select the tab that contains the child tabgroup, you switch the selection of the child tabgroup to the first one that you mean to.
Categorías
Más información sobre Startup and Shutdown en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!


