| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → MATLAB |
| Contents | Index |
| Learn more about MATLAB |
h.unregisterallevents
unregisterallevents(h)
h.unregisterallevents unregisters all events previously registered with COM object h. After calling unregisterallevents, the object no longer responds to any events until you register them again using the registerevent function.
unregisterallevents(h) is an alternate syntax.
COM functions are available on Microsoft Windows systems only.
Register and unregister events for an instance of the mwsamp control, using the eventlisteners function to see the event handler associated with each event:
Register three events and their respective handler routines.
f = figure ('position', [100 200 200 200]);
h = actxcontrol('mwsamp.mwsampctrl.2', ...
[0 0 200 200], f, ...
{'Click' 'myclick'; 'DblClick' 'my2click'; ...
'MouseDown' 'mymoused'});
h.eventlisteners
MATLAB displays:
ans =
'click' 'myclick'
'dblclick' 'my2click'
'mousedown' 'mymoused'
Unregister all events simultaneously with unregisterallevents. eventlisteners returns an empty cell array, indicating that there are no longer any events registered with the control:
h.unregisterallevents; h.eventlisteners
MATLAB displays:
ans =
{}
eventlisteners | events (COM) | isevent | registerevent | unregisterevent
![]() | unmkpp | unregisterevent | ![]() |

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.
| © 1984-2009- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |