User Guide
1180 TextArea component
Customizing the TextArea component
You can transform a TextArea component horizontally and vertically while authoring and at
runtime. While authoring, select the component on the Stage and use the Free Transform tool
or any of the Modify > Transform commands. At runtime, use
UIObject.setSize() or any
applicable properties and methods of the Te xtA re a c l ass .
When a TextArea component is resized, the border is resized to the new bounding box. The
scroll bars are placed on the bottom and right edges if they are required. The text area is then
resized within the remaining area; there are no fixed-size elements in a TextArea component.
If the TextArea component is too small to display the text, the text is clipped.
Using styles with the TextArea component
The TextArea component has its backgroundColor and borderStyle style properties
defined on a class style declaration. Class styles override global styles; therefore, if you want to
set the
backgroundColor and borderStyle style properties, you must create a different
custom style declaration on the instance.
If the name of a style property ends in “Color”, it is a color style property and behaves
differently than noncolor style properties. For more information, see “Using styles to
customize component color and text” in Using Components.
A TextArea component supports the following styles:
Style Theme Description
backgroundColor
Both The background color. The default color is white.
borderStyle
Both The TextArea component uses a RectBorder instance
as its border and responds to the styles defined on that
class. See “RectBorder class” on page 1063.
The default border style is
"inset".
marginLeft
Both A number indicating the left margin for text. The default
value is 0.
marginRight
Both A number indicating the right margin for text. The
default value is 0.
color
Both The text color. The default value is 0x0B333C for the
Halo theme and blank for the Sample theme.
disabledColor
Both The color for text when the component is disabled. The
default color is 0x848384 (dark gray).