T > TextField.autoSize

 

TextField.autoSize

Availability

Flash Player 6.

Usage

TextField.autoSize

Description

Property; controls automatic sizing and alignment of text fields. 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 is "left", the text field expands or contracts its right and bottom sides to fit all contained text. The left and top sides remain at the same positions. 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. When setting the autoSize property, true is a synonym for "left" and false is a synonym for "none".

Example

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

textField2.autosize = "center";