User`s guide
Examples: Program GUI C omponents
set of radio buttons, toggle buttons, or both, the button group allows only one
of them to be selected. When a user clicks a button, that button is s elected
and all other buttons are deselected.
When programming a button group, you do not code callbacks for the
individual buttons; instead, use its
SelectionChangeFcn callback to manage
responses to selections. The following example, “Program a Button G roup” on
page 12-30, illustrates how you use
uibuttongroup eventdatatodothis.
The following figure shows a button group with two radio buttons and two
toggle buttons. Radio Button 1 is selected.
If a user
clicks the other radio button or one of the toggle buttons, it becomes
select
ed and Radio Button 1 is deselected. The following figure show s the
result
of clicking Toggle Button 2.
12-29