Adobe Flex 3 Help

Formatting text

You have several options for programmatically formatting the display of text. You can set properties directly on the TextField instance--for example, the TextFIeld.thickness, TextField.textColor, and TextField.textHeight properties. Or you can designate the content of the text field using the htmlText property and use the supported HTML tags, such as b, i, and u. But you can also apply TextFormat objects to text fields containing plain text, or StyleSheet objects to text fields containing the htmlText property. Using TextFormat and StyleSheet objects provides the most control and consistency over the appearance of text throughout your application. You can define a TextFormat or StyleSheet object and apply it to many or all text fields in your application.

Subtopics