Style
selectionDisabledColor
selectionEasing
textRollOverColor
textSelectedColor
useRollOver
Setting styles for all List components in a document
The List class inherits from the ScrollSelectList class. The default class-level style properties are
defined on the ScrollSelectList class, which the Menu component and all List-based components
extend. You can set new default style values on this class directly, and the new settings will be
reflected in all affected components.
_global.styles.ScrollSelectList.setStyle("backgroundColor", 0xFF00AA);
To set a style property on the List and List-based components only, you can create a new
CSSStyleDeclaration
import mx.styles.CSSStyleDeclaration;
if (_global.styles.List == undefined) {
_global.styles.List = new CSSStyleDeclaration();
}
_global.styles.List.setStyle("backgroundColor", 0xFF00AA);
When creating a new class-level style declaration, you will lose all default values provided by the
ScrollSelectList
supporting mouse events. To create a class-level style declaration and preserve defaults, use a
loop to copy the old settings to the new declaration.
for..in
var source = _global.styles.ScrollSelectList;
var target = _global.styles.List;
for (var style in source) {
Theme Description
Both
The background color of a selected row. The default value is
a 0xDDDDDD (medium gray). Because the default value
for this property is the same as the default for
backgroundDisabledColor
the component is disabled unless one of these style
properties is changed.
Both
A reference to the easing equation used to control the
transition between selection states. This applies only for the
transition from a normal to a selected state. The default
equation uses a sine in/out formula. For more information,
see
Both
The color of text when the mouse pointer rolls over it. The
default value is 0x2B333C (dark gray). This style is
important when you set
settings must complement each other so that text is easily
viewable during a rollover.
Both
The color of text in the selected row. The default value is
0x005F33 (dark gray). This style is important when you set
selectionColor
complement each other so that text is easily viewable while
selected.
Both
Determines whether rolling over a row activates
highlighting. The default value is
instance and store it in
declaration. This includes
, the selection is not visible when
"Customizing component animations" on page
rollOverColor
, because the two settings must
_global.styles.List
backgroundColor
, because the two
.
true
.
, which is required for
List component
75.
455
Need help?
Do you have a question about the FLASH MX 2004-USING COMPONENTS and is the answer not in the manual?
Questions and answers