MATLAB Answers

Bug in TabGroup appearance in AppDesigner (R2019b)

12 views (last 30 days)
Vincenzo
Vincenzo on 9 Jun 2020
Answered: Kim Sander on 9 Sep 2020 at 15:15
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.

  0 Comments

Sign in to comment.

Answers (5)

Chidvi Modala
Chidvi Modala on 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 Comment

Vincenzo
Vincenzo on 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?

Sign in to comment.


Chidvi Modala
Chidvi Modala on 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 Comment

Vincenzo
Vincenzo on 19 Jun 2020
any feedback? are you able to replicate the issue I described below?

Sign in to comment.


Vincenzo
Vincenzo on 12 Jun 2020
Edited: Vincenzo on 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.

  0 Comments

Sign in to comment.


Vincenzo
Vincenzo on 23 Jun 2020
no one is able to replicate the issue I described? It's only a problem for me?

  0 Comments

Sign in to comment.


Kim Sander
Kim Sander on 9 Sep 2020 at 15:15
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;

  0 Comments

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!