actionscript-3apache-flexflex3

TextField() Set caret position


How to set the caret position, there is only

this.caretIndex (READ)


Solution

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

    eg

    this.textField.setSelection(20, 20)