Adobe FLEX 2 - CREATING AND EXTENDING COMPONENTS Manual page 189

Creating and extending flex 2 components
Hide thumbs Also See for FLEX 2 - CREATING AND EXTENDING COMPONENTS:
Table of Contents

Advertisement

Defining a style property
You define a style property for a component in the class definition.
To define a new style property:
Insert the
1.
[Style]
You insert the
[Style]
attribute for a style property. If you omit the
issues a syntax error when you try to set the property as an MXML tag attribute.
The
metadata tag has the following syntax:
[Style]
[Style(name="style_name"[,property="value",...])]
For more information, see
page
45.
Override the
2.
styleChanged()
Override
3.
updateDisplayList()
display.
Define a static initializer to set the default value of the style property.
4.
For more information, see
metadata tag that defines the style before the class definition.
metadata tag before the class definition to define the MXML tag
Chapter 5, "Using Metadata Tags in Custom Components," on
method to detect changes to the property.
method to incorporate the style into the component
"Setting default style values" on page
metadata tag, the MXML compiler
[Style]
192.
Example: Creating style properties
189

Advertisement

Table of Contents
loading

Table of Contents