Mega Code Archive
Difference between correctly and incorrectly applying a non-inheriting style property to a pair of TextArea controls
private function doSomething():void {
/* To set a non-inheritable style on a TextArea, you must actually
apply it to the underlying RichEditableText subcomponent, which is
accessed through the textDisplay property: */
text1.textDisplay.setStyle("columnCount", 2);
/* Setting a non-inheritable style directly on the TextArea does
not apply the style properly. */
text2.setStyle("columnCount", 2);
}
This is TextArea #1. This is enough text to ensure that there will be more
than one column if the columnCount property is properly applied.
This is TextArea #2. This is enough text to ensure that there will be more
than one column if the columnCount property is properly applied.