Originally Posted by springframework
sorry to let u in on this secret, but UITextField doesn't work.
but if u want to try and use it even though it doesn't work you can do.
.autoSize = TextFieldAutoSize.LEFT; //CENTER //RIGHT
This thread is a couple of weeks old, but since basic information on flex is often sorely lacking (e.g. a search on UITextField in this forum yields only eight entries) I thought it worthwhile to pass along info as I discover it.
When using UITextField in Flex, you have to access it on the right events or you may not get valid results. The textField member of mx:Text is protected in all liklihood for this very reason. On the resize event, textField.getLineIndexOfChar and textField.getLineLength both work, but textField.getCharBoundaries does not. However, by the time the render event occurs, getCharBoundaries is working.
So anyway, FWIW.
Not exactly correct. getCharBoundaries can be called on resize event, but return value should be checked for null, because on the first resize event, it actually returns null.