A SERVICE OF

logo

Chapter 4: Property Management 75
iTool Developer’s Guide Registering Properties
self->RegisterProperty, 'FONT_STYLE', $
ENUMLIST = ['Normal', 'Bold'], $
NAME = 'Font style'
Here, the string argument FONT_STYLE is the property identifier of the property
being registered; this string must be the same as the name of the keyword used with
the GetProperty or SetProperty method when changing the value of the property.
The ENUMLIST keyword specifies that the property data type is an enumerated list
of strings containing two possible property values (
'Normal', 'Bold'); this will
appear as a pulldown list of values in the property sheet. The NAME keyword
specifies the string that will be used as the label for the property in the property sheet;
if NAME is omitted, the property identifier string will be used in the property sheet.
Note
Values set via keywords to the RegisterProperty method are known as property
attributes. Property attributes can be modified after registration using the
SetPropertyAttribute method, described in “Property Attributes” on page 78.
Additional keywords can be set in the call to RegisterProperty. See the
documentation for “IDLitComponent::RegisterProperty” (IDL Reference Guide) for
additional details.
In addition to registering the property using RegisterProperty, you must make sure
that the GetProperty and SetProperty methods of your object handle the value of the
property being registered.
Pre-Registered Properties
Not all properties need to be explicitly registered in your iTool code in order to be
displayed in a property sheet. Most of the IDL graphics objects (IDLgrAxis,
IDLgrPlot, etc.) have a set of properties that are automatically registered if you set the
REGISTER_PROPERTIES property of the object to 1 when it is instantiated. See the
list of object properties contained in the documentation for the IDL graphics objects
in the IDL Reference Guide to determine which properties are registered when the
REGISTER_PROPERTIES property is set.
There may be times when you want some, but not all, of the registrable properties of
a graphics object to appear in the property sheet interface. You have two options in
this case:
1. Register the properties of the graphics object individually, with calls to the
RegisterProperty method.