External Interfaces Reference Previous page   Next Page
unregisterallevents

Unregister all events for control

Syntax

Description

h.unregisterallevents unregisters 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.

unregisterallevents(h) is an alternate syntax for the same operation.

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:

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. First, create the control and register three events:

Next, unregister two of the three events. The mousedown event remains registered:

See Also

events, eventlisteners, registerevent, unregisterevent, isevent


Previous page  set (COM) unregisterevent Next page

© 1994-2005 The MathWorks, Inc.