Adobe FLEX 2 - CREATING AND EXTENDING COMPONENTS Manual page 88

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

Advertisement

You can also use a type selector to define styles. A type selector applies styles to all instances of
a component, as the following example shows:
<?xml version="1.0"?>
<!-- mxml/MainStyleOverrideUsingTypeSel.mxml -->
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
xmlns:MyComp="myComponents.*">
<mx:Style>
StateComboBoxWithStyleProps {
openDuration : 1000;
}
</mx:Style>
<MyComp:StateComboBoxWithStyleProps/>
</mx:Application>
In this example, the type selector specifies the
StateComboBox control in the application. When you specify any styles by using a type
selector, those styles override all styles that you set by using a class selector in the MXML file.
Those styles do not override styles that you set by using tag properties in the MXML file.
88
Creating Simple MXML Components
style for all instances of the
openDuration

Advertisement

Table of Contents
loading

Table of Contents