The TextArea control is a multiline text field with a border and optional scroll bars. All text in a TextArea control must use the same styling unless it is HTML text. The TextArea control supports the HTML rendering capabilities of Macromedia Flash Player. The TextArea control broadcasts a change event.
If you disable a TextArea control, it displays contents in a different color, represented by the disabledColor style. You can set a TextArea control to read-only to disallow editing of the text. To conceal input text by displaying characters as asterisks, you set the TextArea`s password property.
MXML Syntax
The <mx:TextArea> tag inherits all the properties of its parent classes, and the following properties:
<mx:TextArea
editable="true|false"
hPosition="Always 0 when wordwrap is set to true."
hScrollPolicy="auto|on|off"
htmlText="No default."
maxChars="undefined"
maxHPosition="Always 0 when wordwrap is set to true."
maxVPosition="0"
password="false|true"
restrict="null"
text="No default."
vPosition="0"
vScrollPolicy="auto|on|off"
wordWrap="false|true"
change="Event handler; no default."
scroll="Event handler; no default."
/>
See Also
mx.controls.TextInput
| Methods |
| Methods inherited from class mx.core.ScrollView |
setScrollProperties
getViewMetrics
createChild
|
| Methods inherited from class mx.core.View |
init
draw
createChild
getChildAt
getChildIndex
setChildIndex
destroyAllChildren
destroyChild
destroyChildAt
getViewMetrics
|
| Methods inherited from class mx.core.UIComponent |
getFocus
setFocus
getFocusManager
|
| Properties | |
static | version:String
ComponentVersion is for internal use only. |
| className:String
Name of this class. |
| maxChars:Number
[Read-Write]
Maximum number of characters that the text field can contain. |
| length:Number
[Read-Only]
Length of text in the TextArea. |
| restrict:String
[Read-Write]
Set of characters that a user can enter into the text field. |
| wordWrap:Boolean
[Read-Write]
If true, the text wraps. |
| editable:Boolean
[Read-Write]
If true, the user can edit the text. |
| password:Boolean
[Read-Write]
If true, the field is a password field. |
| text:String
[Read-Write]
Text string that appears in the control. |
| htmlText:String
[Read-Write]
Contains HTML formatted text. |
| hPosition:Number
[Read-Write]
Pixel position of the leftmost character that is currently displayed. |
| vPosition:Number
[Read-Write]
Line number of the top row of characters that is currently displayed. |
| maxVPosition:Number
[Read-Only]
Maximum value of vPosition. |
| maxHPosition:Number
[Read-Only]
Maximum value of hPosition. |
| tabIndex:Number
[Read-Write]
Tab order for navigating with the Tab key. |
| hScrollPolicy:String
Whether the horizontal scroll bar is always on, on, always off, off, turns on when needed, or auto. |
| vScrollPolicy:String
Whether the vertical scroll bar is always on, on, never on, off, or turns on when needed auto. |
| Properties inherited from class mx.core.ScrollView |
version
className
hScrollPolicy
vScrollPolicy
hPosition
vPosition
maxVPosition
maxHPosition
|
| Properties inherited from class mx.core.View |
version
className
numChildren
|
| Properties inherited from class mx.core.UIComponent |
version
enabled
tabIndex
|
| Effects |
| Effects inherited from class mx.core.UIComponent |
showEffect
hideEffect
focusInEffect
focusOutEffect
|
| Effects inherited from class mx.core.UIObject |
creationCompleteEffect
moveEffect
resizeEffect
mouseDownEffect
mouseOverEffect
mouseOutEffect
mouseUpEffect
|
| Events | |
change | Broadcast when text in the TextArea control changes. Target contains a reference to the component that triggered the event. Type contains the name of the event. |
| Events inherited from class: mx.core.ScrollView |
scroll
|
| Events inherited from class: mx.core.View |
childCreated
childIndexChanged
childDestroyed
|
| Events inherited from class: mx.core.UIComponent |
focusIn
focusOut
keyDown
keyUp
show
hide
valid
invalid
valueCommitted
|
| Styles | |
disabledColor |
Type: Number
Format: Color
CSS Inheritance: yes
Disabled color of the TextArea. |
| Styles inherited from class mx.core.UIObject |
color
fontFamily
fontSize
fontStyle
fontWeight
textAlign
textDecoration
textIndent
marginLeft
marginRight
horizontalGap
verticalGap
|
| Property Detail |
className:String
editable:Boolean
[Read-Write]
hPosition:Number
[Read-Write]
hScrollPolicy:String
htmlText:String
[Read-Write]
length:Number
[Read-Only]
maxChars:Number
[Read-Write]
maxHPosition:Number
[Read-Only]
maxVPosition:Number
[Read-Only]
password:Boolean
[Read-Write]
restrict:String
[Read-Write]
tabIndex:Number
[Read-Write]
text:String
[Read-Write]
static version:String
vPosition:Number
[Read-Write]
vScrollPolicy:String
wordWrap:Boolean
[Read-Write]