Chapter 11: Creating Custom Style Properties; About Styles - Adobe FLEX 2 - CREATING AND EXTENDING COMPONENTS Manual

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

Advertisement

CHAPTER 11
11
Creating Custom Style
Properties
Styles are useful for defining the look and feel of your Adobe Flex applications, including
letting users set component skins. You can use them to change the appearance of a single
component, or apply them across all components. This topic describes how to create style
properties for your custom components.
Contents

About styles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183

Example: Creating style properties. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187
About styles
You modify the appearance of Flex components through style properties. These properties can
define the size of a font used in a
Label
control, or the background color used in the
Tree
control. In Flex, some styles are inherited from parent containers to their children, and across
style types and classes. This means that you can define a style once, and then have that style
apply to all controls of a single type or to a set of controls. Also, you can override individual
properties for each control at a local, document, or global level, giving you great flexibility in
controlling the appearance of your applications.
For more information, see Chapter 18, "Using Styles and Themes," in Flex 2 Developer's
Guide.
183

Advertisement

Table of Contents
loading

Table of Contents