| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → MATLAB |
| Contents | Index |
| Learn more about MATLAB |
h.deleteproperty('propertyname')
deleteproperty(h, 'propertyname')
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.
You can only delete properties created with the addproperty function.
COM functions are available on Microsoft Windows systems only.
Remove 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);
h.get
MATLAB displays its properties:
Label: 'Label'
Radius: 20
Add a custom property named Position and assign a value:
h.addproperty('Position');
h.Position = [200 120];
h.get
MATLAB displays (in part):
Label: 'Label'
Radius: 20
Position: [200 120]Delete the custom property Position:
h.deleteproperty('Position');
h.get
MATLAB displays the original list of properties:
Label: 'Label'
Radius: 20
addproperty | get (COM) | inspect | set (COM)
![]() | delete (timer) | delevent | ![]() |

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.
| © 1984-2009- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |