Flash 8 Documentation |
|||
| Components Language Reference > TextArea component > TextArea class | |||
Inheritance MovieClip > UIObject class > UIComponent class > View > ScrollView > TextArea
ActionScript Class Name mx.controls.TextArea
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.
Each component class has a version property, which is a class property. Class properties are available only on the class itself. The version property returns a string that indicates the version of the component. To access this property, use the following code:
trace(mx.controls.TextArea.version);
|
NOTE |
|
The code |
There are no methods exclusive to the TextArea class.
The following table lists the methods the TextArea class inherits from the UIObject class. When calling these methods from the TextArea object, use the form TextAreaInstance.methodName.
|
Method |
Description |
|---|---|
|
Creates an object on the specified class. |
|
|
Creates a subobject on an object. |
|
|
Destroys a component instance. |
|
|
Calls a function when parameters have been set in the Property and Component inspectors. |
|
|
Gets the style property from the style declaration or object. |
|
|
Marks the object so it is redrawn on the next frame interval. |
|
|
Moves the object to the requested position. |
|
|
Forces validation of the object so it is drawn in the current frame. |
|
|
Resizes the object to the requested size. |
|
|
Sets a skin in the object. |
|
|
Sets the style property on the style declaration or object. |
The following table lists the methods the TextArea class inherits from the UIComponent class. When calling these methods from the TextArea object, use the form TextAreaInstance.methodName.
|
Method |
Description |
|---|---|
|
Returns a reference to the object that has focus. |
|
|
Sets focus to the component instance. |
The following table lists properties of the TextArea class.
|
Property |
Description |
|---|---|
|
A Boolean value indicating whether the field is editable ( |
|
|
Defines the horizontal position of the text in the field. |
|
|
Indicates whether the horizontal scroll bar is always on ( |
|
|
A Boolean value that indicates whether the text area contents can be formatted with HTML. |
|
|
Read-only; the number of characters in the text area. |
|
|
The maximum number of characters that the text area can contain. |
|
|
Read-only; the maximum value of TextArea.hPosition. |
|
|
Read-only; the maximum value of TextArea.vPosition. |
|
|
A Boolean value indicating whether the field is a password field ( |
|
|
The set of characters that a user can enter in the text area. |
|
|
Attaches a style sheet to the specified TextArea component. |
|
|
The text contents of a TextArea component. |
|
|
A number indicating the vertical scrolling position. |
|
|
Indicates whether the vertical scroll bar is always on ( |
|
|
A Boolean value indicating whether the text wraps ( |
The following table lists the properties the TextArea class inherits from the UIObject class. When accessing these properties from the TextArea object, use the form TextAreaInstance.propertyName.
|
Property |
Description |
|---|---|
|
Read-only; the position of the bottom edge of the object, relative to the bottom edge of its parent. |
|
|
Read-only; the height of the object, in pixels. |
|
|
Read-only; the left edge of the object, in pixels. |
|
|
Read-only; the position of the right edge of the object, relative to the right edge of its parent. |
|
|
Read-only; a number indicating the scaling factor in the x direction of the object, relative to its parent. |
|
|
A number indicating the scaling factor in the y direction of the object, relative to its parent. |
|
|
Read-only; the position of the top edge of the object, relative to its parent. |
|
|
A Boolean value indicating whether the object is visible ( |
|
|
Read-only; the width of the object, in pixels. |
|
|
Read-only; the left edge of the object, in pixels. |
|
|
Read-only; the top edge of the object, in pixels. |
The following table lists the properties the TextArea class inherits from the UIComponent class. When accessing these properties from the TextArea object, use the form TextAreaInstance.propertyName.
|
Property |
Description |
|---|---|
|
Indicates whether the component can receive focus and input. |
|
|
A number indicating the tab order for a component in a document. |
The following table lists the event of the TextArea class.
|
Event |
Description |
|---|---|
|
Notifies listeners that text has changed. |
|
|
Notifies listeners that text has scrolled. |
The following table lists the events the TextArea class inherits from the UIObject class.
|
Event |
Description |
|---|---|
|
Broadcast when an object is about to draw its graphics. |
|
|
Broadcast when an object's state changes from visible to invisible. |
|
|
Broadcast when subobjects are being created. |
|
|
Broadcast when the object has moved. |
|
|
Broadcast when an object has been resized. |
|
|
Broadcast when an object's state changes from invisible to visible. |
|
|
Broadcast when the subobjects are being unloaded. |
The following table lists the events the TextArea class inherits from the UIComponent class.
|
Event |
Description |
|---|---|
|
Broadcast when an object receives focus. |
|
|
Broadcast when an object loses focus. |
|
|
Broadcast when a key is pressed. |
|
|
Broadcast when a key is released. |
Version 8
Send me an e-mail when comments are added to this page | Comment Report
Current page: http://livedocs.adobe.com/flash/8/main/00004043.html