TextField() Set caret position

Tom picture Tom · Feb 11, 2009 · Viewed 11.7k times · Source

How to set the caret position, there is only

this.caretIndex (READ)

Answer

James Hay picture James Hay · Feb 11, 2009

use setSelection(beginIndex:int, endIndex:int):void

eg

this.textField.setSelection(20, 20)