Thursday, May 3, 2007

FAQ.text

TextArea, TextInput, Label, Text (all in the mx.controls package) all use mx.core.UITextField to render text. If there was a method that you wish were in one of these text controls, it may be in flash.text.TextField (which is the grandparent of UITextField). There is a lot of information about how text operates in flash under "flash.text.TextField" on this site. But before you look through the undocumented features (see the navigation menu to your right), check the documented ones here. Documented highlights include:
getCharBoundries, getCharIndexAtPoint, getFirstCharInParagraph, getLineIndexAtPoint, getLineIndexOfChar, getLineLength, getLineMetrics, getLineOffset, getLineText, getParagraphLength
You can access the UITextField of these mx controls by extending the control and accessing the protected textField property or you can call mx_internal::getTextField(). See mx.core.mx_internal for how the later works.

No comments:

"Flex", "ActionScript" and possibly "MXML" are probably trademarks of Adobe Systems Incorporated.
"Adobe" is a trademark of Adobe Systems Incorporated.
This site is in no way endorsed or sponsored by Adobe Systems Incorporated.
Content Copyright © 2007 Daniel Freiman.
Site Design Copyright by its copyright holder.
The Flex Non-Docs reserves the right to remove comments for any reason.
All ActionScript and MXML code (and ONLY ActionScript and MXML code) on this website is available under the MIT License.