Applying styles to a TextField object

To apply a style sheet object to a text field, you assign the style sheet object to the text field's styleSheet property.

textObj_txt.styleSheet = styleSheetObj;

Note: Be careful not to confuse the TextField.styleSheet property with the TextField.StyleSheet class. The capitalization indicates the difference.

When you assign a style sheet object to a TextField object, the following changes occur to the text field's normal behavior: