11 Code a Programmatic UI
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, uitableOffCallback Executes when the State of a
toggle tool changes to 'off'.uitoggletoolOnCallback Executes when the State of a
toggle tool changes to 'on'.uitoggletoolSizeChangedFcnEnd user resizes a button group,
figure, or panel whose Resize
property is 'on'.figure, uipanel,
uibuttongroupSelectionChangedFcnEnd user selects a different radio
button or toggle button within a
button group.uibuttongroupWindowButtonDownFcnEnd user presses a mouse button
while the pointer is in the figure
window.figureWindowButtonMotionFcnEnd user moves the pointer within
the figure window.figureWindowButtonUpFcnEnd 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