Style
textAlign
textIndent
textDecoration
The TextArea and TextInput components use exactly the same styles and are often used in the
same manner. Thus, by default they share the same class-level style declaration. For example, the
following code sets a style on the TextInput declaration, but it affects both TextInput and
TextArea components.
_global.styles.TextInput.setStyle("disabledColor", 0xBBBBFF);
To separate the components and provide class-level styles for one and not the other, create a new
style declaration.
import mx.styles.CSSStyleDeclaration;
_global.styles.TextArea = new CSSStyleDeclaration();
_global.styles.TextArea.setStyle("disabledColor", 0xFFBBBB);
This example does not check if
assumes you know it exists and want to overwrite it.
Using skins with the TextArea component
The TextArea component uses an instance of RectBorder for its border and scroll bars for
scrolling images. For more information about skinning these visual elements, see
class" on page 647
TextArea class
Inheritance
MovieClip >
TextArea
ActionScript Class Name
The properties of the TextArea class let you set the text content, formatting, and horizontal and
vertical position at runtime. You can also indicate whether the field is editable, and whether it is a
"password" field. You can also restrict the characters that a user can enter.
Setting a property of the TextArea class with ActionScript overrides the parameter of the same
name set in the Property inspector or Component inspector.
The TextArea component overrides the default Flash Player focus rectangle and draws a custom
focus rectangle with rounded corners.
The TextArea component supports CSS styles and any additional HTML styles supported by
Flash Player.
728
Chapter 6: Components Dictionary
Theme Description
Both
The text alignment: either
default value is
Both
A number indicating the text indent. The default value is 0.
Both
The text decoration: either
value is
_global.styles.TextArea
and
"Using skins with the UIScrollBar component" on page
UIObject class
mx.controls.TextArea
"left"
.
"left"
"none"
.
"none"
existed before overwriting it; it
>
UIComponent class
,
, or
"right"
"center"
or
. The default
"underline"
"RectBorder
831.
> View > ScrollView >
. The
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