External Interfaces/API Reference |
Add custom property to COM object
Syntax
Arguments
h
Handle for a COM object previously returned from actxcontrol
, actxserver
, get
, or invoke
.
propertyname
A string specifying the name of the custom property to add to the object or interface.
Description
Add a custom property, propertyname
, to the object or interface, h
. You can assign a value to that property using set.
Examples
Create an mwsamp
control and add a new property named Position
to it. Assign an array value to the property:
f = figure('pos', [100 200 200 200]); h = actxcontrol('mwsamp.mwsampctrl.2', [0 0 200 200], f); get(h) Label: 'Label' Radius: 20 addproperty(h, 'Position'); set(h, 'Position', [200 120]); get(h) Label: 'Label' Radius: 20 Position: [200 120] get(h, 'Position') ans = 200 120
See Also
deleteproperty
, get
, set
, inspect
actxserver | delete (COM) |