Filter löschen
Filter löschen

Bug in TabGroup appearance in AppDesigner (R2019b)

5 Ansichten (letzte 30 Tage)
Vincenzo am 9 Jun. 2020
Beantwortet: Peng Li am 15 Nov. 2022
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.

Antworten (7)

Vincenzo am 12 Jun. 2020
Bearbeitet: Vincenzo am 12 Jun. 2020
Thanks for your answer, but I probably didn't well explained the issue.
I have an external TabGroup; inside the first tab there is an internal TabGroup; inside the second tab there is another internal TabGroup.
By default, the first tab of the external TabGroup is selected, along with the first tab of the internal TabGroup of the first tab of the external TabGroup.
If I click on the second tab of the external TabGroup, the default selection of its internal TabGroup is its first tab, but it appears as if no tab is selected at all.
Only if I click on purpose on the first tab it appears as selected.
I can confirm the first tab is selected by default even if it doesn't appear so because what it's shown is the content of the first tab, instead of the content of the second tab. The issue is only graphical.
The issue is reproducible with any internal TabGroup inside a tab of the external TabGroup except for the first one.

Chidvi Modala
Chidvi Modala am 1 Jul. 2020
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 Kommentar
Vincenzo am 1 Jul. 2020
Thank you, I'll look forward for it. Perhaps you or someone else can tell if the bug is still present in R2020b?

Melden Sie sich an, um zu kommentieren.

Philipp Boecker
Philipp Boecker am 22 Nov. 2020

Chidvi Modala
Chidvi Modala am 12 Jun. 2020
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 Kommentar
Vincenzo am 19 Jun. 2020
any feedback? are you able to replicate the issue I described below?

Melden Sie sich an, um zu kommentieren.

Vincenzo am 23 Jun. 2020
no one is able to replicate the issue I described? It's only a problem for me?
  1 Kommentar
Edward Burdak
Edward Burdak am 30 Sep. 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.

Melden Sie sich an, um zu kommentieren.

Kim Sander
Kim Sander am 9 Sep. 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
Peng Li am 15 Nov. 2022
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.


Mehr zu Simulink Environment Customization finden Sie in Help Center und File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by