MACROMEDIA FLASH MX 2004-USING COMPONENTS Use Manual page 769

Using components
Hide thumbs Also See for FLASH MX 2004-USING COMPONENTS:
Table of Contents

Advertisement

Style
textRollOverColor
textSelectedColor
useRollOver
Setting styles for all Tree components in a document
The Tree class inherits from the List class, which 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 Tree components only, you can create a new
instance and store it in
import mx.styles.CSSStyleDeclaration;
if (_global.styles.Tree == undefined) {
_global.styles.Tree = new CSSStyleDeclaration();
}
_global.styles.Tree.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.Tree;
for (var style in source) {
target.setStyle(style, source.getStyle(style));
}
For more information about class-level styles, see
on page
71.
Using skins with the Tree component
The Tree component uses an instance of RectBorder for its border and scroll bars for scrolling
images. For more information about skinning these visual elements, see
on page 647
and
"Using skins with the UIScrollBar component" on page
Theme Description
Both
The color of text when the pointer rolls over it. The default
value is 0x2B333C (dark gray). This style is important when
you set
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
other so that text is easily viewable while selected.
Both
Determines whether rolling over a row activates
highlighting. The default value is
_global.styles.DataGrid
declaration. This includes
, because the two must complement
rollOverColor
, because the two must complement each
.
, which is required for
backgroundColor
"Setting styles for a component class"
Tree component (Flash Professional only)
.
true
CSSStyleDeclaration
"RectBorder class"
831.
769

Advertisement

Table of Contents
loading
Need help?

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

This manual is also suitable for:

Flash mx

Table of Contents