MATLAB: Do ‘SelectChangeFcn’ callbacks need to be activated for a button group in GUIDE

activatecallbackenableexclusivegroupguideMATLABmutuallyradiobuttontoggleuibutton

'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.

Best 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.
Related Question