T > TextField.autoSize |  |

TextField.autoSize

TextField, TextField.autoSize, autoSize

Availability

Flash Player 6.

Usage

    TextField.autoSize

Description

Property; controls automatic sizing and alignment of text fields. When you set the `autoSize` property, `true` is a synonym for `"left"` and `false` is a synonym for `"none"`. Resizing takes place as follows:

| If the value of autosize is `"none"`, the text field behaves normally and does not automatically resize or align to match the text.
| If the value of autosize is `"left"` and the text field line type is set to Multiline in the text Property inspector, then the text field expands or contracts its right and bottom sides to fit all contained text.
| If the value of autosize is `"left"` and the text field line type is set to Multiline No Wrap in the text Property inspector, then the text field expands or contracts only its right side to fit all contained text.
| If the value of autosize is `"center"`, the text field auto-sizes, but the horizontal center of the text field stays anchored at the text field's original horizontal center position. The bottom side still expands to fit all contained text.
| If the value of autosize is `"right"`, the text field auto-sizes; but the left and bottom sides expand or contract. The top and right side remain in the same positions.

Example

The following sets the `autosize` property of the text field textField2 to `"center"`.

    textField2.autosize = "center";