User`s guide

Customizing Callbacks in GUIDE
warnbeforesave. If possible, change the Tag property before saving the GUI
to cause GUIDE to autom atically create callback templates having names you
prefer. H owever, if you decide to change a
Tag property after saving the G U I,
GUIDE updates the following items according to the new
Tag,providedthat
all components have distinct tags:
The component’s callback functions in the GUI code file
The value of the component’s callback properties, which y ou can view in
the Property Inspector
References in the code file to the field of the
handles structure that
contains the component’s handle. See “handles Structure” on page 8-22 for
more information about the
handles structure.
To rename a particular callback function without changing the
Tag property,
In the Property Inspector, replace the name string in the callback property
with the new name . For example, if the value of the callback property for
apushbuttonin
mygui is
mygui('pushbutton1_Callback',hObject,ev entdata,guidata(hObject ))
the string pushbutton1_Callback isthenameofthecallbackfunction.
Changethenametothedesiredname,forexample,
closethegui.
As necessary, update instances of the callback function name in the code
file (for example, to
function closet hegu i in its function definition).
After y ou alter a callback signature, when ever you clic k its pencil-and-paper
icon
to go to the function definition in the GUI code file, GUIDE presents
a dialog box for you to confirm the changes you made.
8-23