How do I add a graphics object callback subfunction to a GUI MATLAB program using GUIDE in MATLAB?
2 views (last 30 days)
Show older comments
I want to add a graphics object callback subfunction, such as 'ButtonDownFcn', to my GUI MATLAB program using GUIDE.
Accepted Answer
MathWorks Support Team
on 20 Jan 2010
Graphics objects can have additional callback routines like ButtonDownFcn, CreateFcn, and DeleteFcn, which are executed with the appropriate user action.
Figures can also have the following callbacks:
CloseRequestFcn
KeyPressFcn
ResizeFcn
WindowButtonDownFcn
WindowButtonMotionFcn
WindowButtonUpFcn
To add a callback subfunction to the MATLAB program:
1. Click the right mouse button while the object is selected to display the Layout Editor context menu
2. Select View Callbacks
3. Select the desired callback from the context menu
GUIDE then adds the subfunction stub to the MATLAB program file for the GUI.
For more information on this, visit the following documentation page on our web site:
<http://www.mathworks.com/access/helpdesk/help/techdoc/creating_guis/f10-1005070.html#f10-999362>
0 Comments
More Answers (0)
See Also
Categories
Find more on Visual Exploration in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!