Specifications
Setting Component Properties — The Property Inspector
3-53
• In the View menu, select View Callbacks. Then select the desired callback,
e.g.,
KeyPressFcn. GUIDE adds the callback to the M-file, opens the M-file
if it is not already open, and scrolls to the first line of the new callback.
Changing Tag and Callback Properties
This section discusses what you need to keep in mind if you change a
component’s
tag or the value of any of its callback properties. This section
covers the following topics:
• “Changing a Tag” on page 3-53
• “Changing Callback Properties” on page 3-53
Changing a Tag
Once GUIDE generates the GUI M-file, if you subsequently change a
component’s
Tag in the Property Inspector, GUIDE can correctly update the
following items according to the new
Tag, provided that all components have
distinct tags:
• The component’s callback functions in the M-file
• The value of component’s callback properties, which you can view in the
Property Inspector
• References in the M-file to the field of the
handles structure that contains
the component’s handle
As an example, you might want to assign the same tag to each of a set of radio
buttons if you want the same callback to service all of them. In this case, you
must also change the name of the callback functions in their callback property
values to be the same.
Changing Callback Properties
You can change the value of a callback property using the Property Inspector.
The initial value of a callback property for a push button in an untitled GUI is
similar to
untitled('pushbutton1_Callback',gcbo,[],guidata(gcbo))
where pushbutton1_Callback is the name of the callback function for that
push button in the M-file.