
TextFormat.underline Property
This is the Title of the Book, eMatter Edition
Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved.
Alphabetical Language Reference
|
905
The default target value (as contained in the TextFormat object returned by TextField.
getTextFormat()) for a text field that contains text is the empty string (
""). For a text field
without any text, the
target value is null. For a completely new TextFormat object, it is
also
null, indicating that target will not be set when the format is applied to a text field:
trace(anyUnformattedField_txt.getTextFormat().target); // Displays nothing
var format = new TextFormat();
trace(format.target); // Displays: "null"
See Also
TextField.html, TextFormat.url
TextFormat.underline Property
Boolean; specifies underlined character display
Flash 6
read/write
theFormat.underline
Description
The Boolean underline property specifies whether characters are displayed with a line
beneath them (
true) or without any underline (false).
To underline an entire text field, invoke TextField.setTextFormat() without specifying any
index arguments:
this.createTextField("theField_txt", 1, 0, 0, 200, 20);
theField_txt.border = true;
theField_txt.text = "Please enter your name."
// Create a TextFormat object
format = new TextFormat();
format.underline = true;
// Underline the whole field
theField_txt.setTextFormat(format);
To underline a single character, apply the format ...