isevent

Determine whether input is COM object event

Syntax

tf = isevent(c,eventname)

Description

example

tf = isevent(c,eventname) returns logical 1 (true) if eventname is an event recognized by the COM object. Otherwise, it returns logical 0 (false).

Examples

collapse all

Test if DblClick is an event in the MATLAB® sample control. MATLAB displays true, indicating DblClick is an event.

Create an instance of the mwsamp control and test DblClick.

f = figure('position',[100 200 200 200]);
h = actxcontrol('mwsamp.mwsampctrl.2',[0 0 200 200],f);
isevent(h,'DblClick')

Test Redraw. MATLAB displays false, indicating Redraw is not an event; it is a method.

isevent(h,'Redraw')

Input Arguments

collapse all

COM object, specified as a function handle.

Event name, specified as a string or a character vector. The eventname argument is not case-sensitive.

Limitations

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

Introduced before R2006a