![]() ![]() ![]() | |
![]() | |
![]() | |
![]() |
You can define a class style declaration for any class of component (Button, CheckBox, and so on) that sets default styles for each instance of that class. You must create the style declaration before you create the instances. Some components, like TextArea and TextInput, have class style declarations predefined by default because their borderStyle
and backgroundColor
properties must be customized.
The following code creates a class style declaration for CheckBox and sets the check box color to blue:
var o = _global.styles.CheckBox = new mx.styles.CSSStyleDeclaration(); o.color = 0x0000FF;
You can also access styles on a class style declaration using the setStyle()
and getStyle()
methods. The following code sets the color style on the RadioButton style declaration:
_global.styles.RadioButton.setStyle("color", "blue");
For more information on supported styles, see Supported styles.
![]() | |
![]() | |
![]() | |
![]() ![]() ![]() |