Recipe 9.7.
Displaying Text
Problem
You want
to display text within a text field.
Solution
Set the text property of a text
field.
Discussion
Aside from being used as input fields, text
fields are often used to display text to the user. Setting a text
field's text property causes the corresponding text to
display in the field:
field.text = "this will display in the field";
Special characters, such as \\t for tab
and \\n for newline, can be used within a text string.
You can append text by using the += operator or the appendText( ) method:
field.appendText("new text");
See Also
Recipe
9.8 for information on support for HTML-formatted text.
|