TextField.border Property

ActionScript for Flash MX: The Definitive Guide, 2nd Edition
By Colin Moock
Chapter 18.  ActionScript Language Reference
TextField.border Property Flash 5

Boolean; turns text field border on and offFlash 6; accessible only via authoring tool in Flash 4 and read/write
theField.border

Description

The Boolean border property specifies whether to show an outline around theField's bounding rectangle (true) or not (false). The outline color is specified by borderColor (defaults to black). To change the size of the rectangle, use the _width and _height properties. To add a background color to the rectangle, use the background and backgroundColor properties.

To produce a more elaborate background for a text field, set background and border to false, and manually draw a shape behind the text field.

Example

Put a black border on theField_txt:

this.createTextField("theField_txt", 1, 0, 0, 80, 20); theField_txt.border = true; theField_txt.text = "hello world";

Now make the border blue:

theField_txt.borderColor = 0x0000FF;

See Also

TextField.background, TextField.backgroundColor, TextField.borderColor, TextField. _height, TextField._width



    ActionScript for Flash MX. The Definitive Guide
    ActionScript for Flash MX: The Definitive Guide, Second Edition
    ISBN: 059600396X
    EAN: 2147483647
    Year: 2002
    Pages: 780
    Authors: Colin Moock

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net