External Interfaces/API Reference |
Unregister all events for a control
Syntax
Arguments
h
Handle for a MATLAB COM control object.
Description
Unregister all events that have previously been registered with control, h
. After calling unregisterallevents
, the control will no longer respond to any events until you register them again using the registerevent function.
Examples
Create an mwsamp
control, registering three events and their respective handler routines. Use the eventlisteners function to see the event handler used by each event:
f = figure ('pos', [100 200 200 200]); h = actxcontrol('mwsamp.mwsampctrl.2', [0 0 200 200], f, ... {'Click' 'myclick'; 'DblClick' 'my2click'; ... 'MouseDown' 'mymoused'}); eventlisteners(h) ans = 'click' 'myclick' 'dblclick' 'my2click' 'mousedown' 'mymoused'
Unregister all of these events at once with unregisterallevents
. Now, calling eventlisteners
returns an empty cell array, indicating that there are no longer any events registered with the control:
To unregister specific events, use the unregisterevent function:
See Also
events
, eventlisteners
, registerevent
, unregisterevent
, isevent
set (COM) | unregisterevent (COM) |