Bug in TabGroup appearance in AppDesigner (R2019b)
이전 댓글 표시
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.
답변 (7개)
Chidvi Modala
2020년 7월 1일
1 개 추천
This is a bug. I have brought this issue to the notice of our developers and will try to fix it in future releases.
Chidvi Modala
2020년 6월 12일
0 개 추천
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.

Vincenzo
2020년 6월 23일
0 개 추천
댓글 수: 1
Edward Burdak
2021년 9월 30일
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
2020년 9월 9일
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
2022년 11월 15일
0 개 추천
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.
카테고리
도움말 센터 및 File Exchange에서 Startup and Shutdown에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!


