uibuttongroup
Create button group container.
📝Syntax
h = uibuttongroup()
h = uibuttongroup(parent)
h = uibuttongroup(..., 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

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.

💡Examples
Captured UI component for the help image.
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();
Example illustration
uibuttongroup
f = uifigure();
bg = uibuttongroup(f, 'Title', 'Choices', 'Position', [20 20 260 210]);
🔗See Also
uifigure
🕔Version History
Version Description
2.0.0 initial version
Edit this page on GitHub