Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

eventlisteners

List event handler functions associated with COM object events

Syntax

info = eventlisteners(c)

Description

example

info = eventlisteners(c) lists the events and their event handler routines registered with a COM object. You can register events either when you create the control using actxcontrol, or after creating the control using registerevent.

Examples

collapse all

Create an mwsamp control and add an event handler function named myclick to the Click event.

f = figure('position',[100 200 200 200]);
C = actxcontrol('mwsamp.mwsampctrl.2',[0 0 200 200],f,{'Click' 'myclick'});
eventlisteners(C)
ans = 'Click'    'myclick'

Register handlers for two more events, DblClick and MouseDown.

registerevent(C,{'DblClick', 'my2click'; 'MouseDown' 'mymoused'})
eventlisteners(C)
ans = 
    'Click'        'myclick' 
    'Dblclick'     'my2click'
    'Mousedown'    'mymoused'

Input Arguments

collapse all

COM object, specified as a function handle.

Output Arguments

collapse all

List of event handler functions, returned as a cell array of character vectors. Each row contains the name of a registered event and the handler routine for that event. If the object has no registered events, eventlisteners returns an empty cell array.

Limitations

  • COM functions are available on Microsoft® Windows® systems only.

Introduced before R2006a

Was this topic helpful?