User`s guide
8 Programming a GUIDE GUI
% Modifier: name(s) of the modifier key(s) (i.e., control, shift)
% pressed
% handles structure with handles and user data (see GUIDATA)
Callbacks that provide event data and the components to which they apply
are listed in the following table. See the appropriate property reference pages
for detailed information.
GUI Component
Callbacks with Event
Data
Property Reference
Pages
Figure
KeyPressFcn,
KeyReleaseFcn,
WindowKeyPressFcn,
WindowKeyReleaseFcn,
WindowScrollWheel
Figure Properties
User interface
control
(
uicontrol)
KeyPressFcn
Uicontrol Properties
Button group
(
uibuttongroup)
SelectionChangeFcn
Uibuttongroup Properties
Table (uitab le)
CellEditCallback,
CellSelectionCallback
Uitable Properties
Note Y ou can avoid autom atic generation of the callback comment lines for
new callbacks. In the Preferences dialog box, select GUIDE and uncheck Add
comments for newly generated callback functions.
Callback Names and Signatures in GUIDE
The previous callback example includes the following function definition:
function pushbu tton 1_Callback(hObject,even tdata,handles)
When GU ID E generates the template, it creates the callback name by
appending an underscore (
_) and the name o f the callback property to the
component’s
Tag property. In the example above, pushbutton1 is the Tag
8-16