Why do 'SelectChangeFcn' callbacks need to be activated for a button group in GUIDE?

'SelectionChangeFcn' callbacks for button groups (uibuttongroup) in GUIDE are not generated by default.
Reproduction Steps:
1. Open GUIDE
2. Drag and drop a button group into the layout area. Drag and drop 2 radio buttons into the button group.
3. Save the GUIDE figure and notice that the file generated in this process does not have a 'SelectionChangeFcn' callback for the button group.
Note that 'SelectionChangeFcn' does not appear as a property in the Property Inspector when you double click on the button group.

 Accepted Answer

To work around this issue explicitly add a button group 'SelectionChangeFcn' callback to the GUI program file using these steps:
1. Select the button group.
2. In the View menu, select View Callbacks -> SelectionChangeFcn.

More Answers (0)

Categories

Find more on Interactive Control and Callbacks in Help Center and File Exchange

Products

Release

R14SP1

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!