deleteproperty - Remove custom property from COM object

Syntax

h.deleteproperty('propertyname')
deleteproperty(h, 'propertyname')

Description

h.deleteproperty('propertyname') deletes the property specified in the string propertyname from the custom properties belonging to object or interface, h.

deleteproperty(h, 'propertyname') is an alternate syntax for the same operation.

Examples

Create an mwsamp control and add a new property named Position to it. Assign an array value to the property:

f = figure('position', [100 200 200 200]);
h = actxcontrol('mwsamp.mwsampctrl.2', [0 0 200 200], f);
h.get
     Label: 'Label'
    Radius: 20

h.addproperty('Position');
h.Position = [200 120];
h.get
       Label: 'Label'
      Radius: 20
    Position: [200 120]

Delete the custom Position property:

h.deleteproperty('Position');
h.get
     Label: 'Label'
    Radius: 20

See Also

addproperty, get (COM), set (COM), inspect

  


 © 1984-2008- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS