Image Processing Toolbox User's Guide |
Delete function handle from callback list
Syntax
Description
iptremovecallback(h,callback,ID)
deletes a callback from the list of callbacks created by imaddcallback
for the object with handle h
and the associated callback string callback
. ID
is the identifier of the callback to be deleted. This ID is returned by iptaddcallback
when you add the function handle to the callback list.
Example
This example registers three callbacks for a particular figure and then removes one of them.
Register the callbacks and try them interactively.
h = figure; f1 = @(varargin) disp('Callback 1'); f2 = @(varargin) disp('Callback 2'); f3 = @(varargin) disp('Callback 3'); id1 = iptaddcallback(h, 'WindowButtonMotionFcn', f1); id2 = iptaddcallback(h, 'WindowButtonMotionFcn', f2); id3 = iptaddcallback(h, 'WindowButtonMotionFcn', f3);
Remove one of the callbacks and then move the mouse over the figure again. Whenever MATLAB detects mouse motion over the figure, function handles f1
and f3
are called in that order.
See Also
iptnum2ordinal | iptsetpref |
© 1994-2005 The MathWorks, Inc.