External Interfaces Reference |
Syntax
Description
tf = h.isevent('name')
returns logical 1
(true
) if the specified name
is an event that can be recognized and responded to by object h
. Otherwise, isevent
returns logical 0
(false
) .
tf = isevent(h, 'name')
is an alternate syntax for the same operation.
Remarks
The string specified in the name
argument is not case sensitive.
For COM control objects, isevent
returns the same value regardless of whether the specified event is registered with the control or not. In order for the control to respond to the event, you must first register the event using either actxcontrol or registerevent.
Examples
Create an mwsamp
control and test to see if DblClick
is an event recognized by the control. isevent
returns true
:
f = figure ('position', [100 200 200 200]); h = actxcontrol ('mwsamp.mwsampctrl.2', [0 0 200 200], f); h.isevent('DblClick') ans = 1
Try the same test on Redraw
, which is a method, and isevent
returns false
:
See Also
events
, eventlisteners
, registerevent
, unregisterevent
, unregisterallevents
iscom | isinterface |
© 1994-2005 The MathWorks, Inc.