User`s guide

Default Callback Properties in GUIDE
When you save the GUI, GUIDE constructs the name of the callback by
appending an underscore (
_) and the name o f the callback property to the
value of the component’s
Tag property. For example, the M ATLA B expression
for the
Callback property for a push button in the G UI unti tled with Tag
property pushbutton1 is
untitled('pushbutton1_Callback',hObject ,eventdata,guidata(hObj ect))
In this case, untitled isthenameoftheGUIcodefileaswellasthename
of the main function for that GUI. The remaining arguments generate input
arguments for
pushbutton1_Callback. Specifically,
hObject is the handle of the callback object (in this case, push butt on1).
eventdata passes a MATL AB struct containing event data. If the object
does not generate event data,
eventdata contains an empty matrix. The
eventdata struct has contents (field names) specific to each type of object
that provides it.
guidata(hObject) obtains the handles structure for this GUI and passes
it to the callback.
See “GUIDE Callback Arguments” on page 8-20 and “Callback Function
Signatures” on page 8-17 fo r more details about callback arguments and how
to customize them.
8-13