uitabgroup
Create tab group container.
📝Syntax
h = uitabgroup()
h = uitabgroup(parent)
h = uitabgroup(..., propertyName, propertyValue)
📥Input Arguments
Parameter Description
parent parent container (uifigure, figure, uipanel, uitab, uibuttongroup, uigridlayout).
propertyName, propertyValue name-value pairs.
📤Output Arguments
Parameter Description
h container object.
📄Description

tg = uitabgroup creates a tab group container. Children are uitab objects. Main properties: TabLocation ('top', 'bottom', 'left', 'right'), SelectedTab, SelectionChangedFcn (event data with OldValue and NewValue).

💡Examples
Captured UI component for the help image.
f = uifigure('Visible', 'off', 'Name', 'Tab group', 'Position', [100 100 420 260]);
tg = uitabgroup(f, 'Position', [55 40 310 180]);
t1 = uitab(tg, 'Title', 'First');
t2 = uitab(tg, 'Title', 'Second');
tg.SelectedTab = t2;
uilabel(t2, 'Text', 'Second tab', 'Position', [35 70 120 24]);
drawnow();
Example illustration
uitabgroup
f = uifigure();
tg = uitabgroup(f, 'Position', [20 20 250 210]);
t1 = uitab(tg, 'Title', 'First');
t2 = uitab(tg, 'Title', 'Second');
tg.SelectedTab = t2;
🔗See Also
uifigure
🕔Version History
Version Description
2.0.0 initial version
Edit this page on GitHub