Creating Graphical User Interfaces |
Push buttons generate an action when clicked (e.g., an OK button may close a dialog box and apply settings). When you click the mouse on a push button, it appears depressed; when you release the mouse, the button appears raised; and its callback executes.
Properties to Set
String
- Set this property to the character string you want displayed on the push button.
Tag
- GUIDE uses the Tag
property to name the callback subfunction in the GUI M-file. Set Tag
to a descriptive name (e.g., close_button
) before activating the GUI.
Programming the Callback
When the user clicks the push button, its callback executes. Push buttons do not return a value or maintain a state.
User Interface Controls | Toggle Buttons |