h = uitabgroup()
h = uitabgroup(parent)
h = uitabgroup(..., propertyName, propertyValue)
| Parameter | Description |
|---|---|
| parent | parent container (uifigure, figure, uipanel, uitab, uibuttongroup, uigridlayout). |
| propertyName, propertyValue | name-value pairs. |
| Parameter | Description |
|---|---|
| h | container object. |
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).
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();
f = uifigure();
tg = uitabgroup(f, 'Position', [20 20 250 210]);
t1 = uitab(tg, 'Title', 'First');
t2 = uitab(tg, 'Title', 'Second');
tg.SelectedTab = t2;
| Version | Description |
|---|---|
| 2.0.0 | initial version |