MATLAB Creating Graphical User Interfaces

(Barry) #1
Write Callbacks Using the GUIDE Workflow

Callback Property User Action Components That Use This Property


CreateFcn Callback executes when MATLAB
creates the object, but before it is
displayed.


axes, figure, uibuttongroup,
uicontextmenu, uicontrol,
uimenu, uipushtool, uipanel,
uitable, uitoggletool,
uitoolbar

DeleteFcn Callback executes just before
MATLAB deletes the figure.


axes, figure, uibuttongroup,
uicontextmenu, uicontrol,
uimenu, uipushtool, uipanel,
uitable, uitoggletool,
uitoolbar

KeyPressFcn End user presses a keyboard key
while the pointer is on the object.


figure, uicontrol, uipanel,
uipushtool, uitable,
uitoolbar

KeyReleaseFcn End user releases a keyboard key
while the pointer is on the object.


figure, uicontrol, uitable

OffCallback Executes when the State of a
toggle tool changes to 'off'.


uitoggletool

OnCallback Executes when the State of a
toggle tool changes to 'on'.


uitoggletool

SizeChangedFcnEnd user resizes a button group,
figure, or panel whose Resize
property is 'on'.


figure, uipanel,
uibuttongroup

SelectionChangedFcnEnd user selects a different radio
button or toggle button within a
button group.


uibuttongroup

WindowButtonDownFcnEnd user presses a mouse button
while the pointer is in the figure
window.


figure

WindowButtonMotionFcnEnd user moves the pointer within
the figure window.


figure

WindowButtonUpFcnEnd user releases a mouse button. figure


WindowKeyPressFcnEnd user presses a key while the
pointer is on the figure or any of
its child objects.


figure
Free download pdf