Remove custom property from COM object
deleteproperty(h,'name')
deleteproperty(h,'name')
deletes property
specified by name
from custom properties belonging
to object or interface h
.
You can only delete properties created with the addproperty
function.
COM functions are available on Microsoft® Windows® systems only.
This example removes a custom property from an instance of the MATLAB® sample control.
Create an instance of the control.
f = figure('position',[100 200 200 200]); h = actxcontrol('mwsamp.mwsampctrl.2',[0 0 200 200],f); get(h)
Label: 'Label' Radius: 20
Add a custom property named Position
and
assign a value:
addproperty(h,'Position')
h.Position = [200 120];
get(h)
Label: 'Label' Radius: 20 Position: [200 120]
Delete the custom property Position
. MATLAB displays
the original list of properties.
deleteproperty(h,'Position')
get(h)
Label: 'Label' Radius: 20
addproperty
| get (COM)
| inspect
| set
(COM)