h = uibuttongroup()
h = uibuttongroup(parent)
h = uibuttongroup(..., propertyName, propertyValue)
| Parameter | Description |
|---|---|
| parent | parent container (uifigure, figure, uipanel, uitab, uibuttongroup, uigridlayout). |
| propertyName, propertyValue | name-value pairs. |
| Parameter | Description |
|---|---|
| h | container object. |
bg = uibuttongroup creates a button group container used to manage exclusive selection of radio buttons and toggle buttons. Main properties: Title, TitlePosition, SelectedObject, Buttons (read-only), SelectionChangedFcn (event data with OldValue and NewValue), plus panel-style border and font properties.
f = uifigure('Visible', 'off', 'Name', 'Button group', 'Position', [100 100 420 260]);
bg = uibuttongroup(f, 'Position', [90 55 240 150]);
r1 = uiradiobutton(bg, 'Text', 'Low', 'Position', [20 95 120 22]);
r2 = uiradiobutton(bg, 'Text', 'High', 'Position', [20 55 120 22]);
r2.Value = true;
drawnow();
f = uifigure();
bg = uibuttongroup(f, 'Title', 'Choices', 'Position', [20 20 260 210]);
| Version | Description |
|---|---|
| 2.0.0 | initial version |