|
addproperty
Add custom property to object
Syntax
h.addproperty('propertyname')
addproperty(h, 'propertyname')
Description
h.addproperty('propertyname') adds the custom property specified in the string, propertyname, to the object or interface, h. Use set to assign a value to the property.
addproperty(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]
h.get('Position')
ans =
200 120
Delete the custom Position property:
h.deleteproperty('Position');
h.get
Label: 'Label'
Radius: 20
See Also
deleteproperty, get, set, inspect
Add by Pancho
You can edit it here
|
|
Adding comments is available only for registered users.
|
If Spiders and Worms Can Do It, Why Can't We?
Imagine a material that is tougher than Kelvar or steel, yet remarkably flexible. It's something you can easily find in your attic or a lingerie store. It's as instantly recognizable today as it was to our early ancestors, yet we still aren't sure exactly how it's made. The miracle thread in question is natural silk, the ubiquitous fibers made by spiders and silkworms, which has been used throughout history for items ranging from stockings and parachutes to surgical sutures. Today ...
More at http://www.nsf.gov/news/news_summ.jsp?cntn_id=117415&WT.mc_id=USNSF_51&WT.mc_ev=click
This is an NSF News item.
|
|
PycckaR BepcuR
Articles

Library

Downloads

|