Tanuj Vaja
Tanuj Vaja

Reputation: 35

Want to set cursor position in Spark textinput control in Flex

I use Flex 4.5. I want to set cursor position based on integer variable. For example if my variable value is 5 then cursor in textbox will point to position 5. So there is any way to achieve this??

Thanks in Advance.

Upvotes: 1

Views: 1034

Answers (1)

Kulikovsky.Igor
Kulikovsky.Igor

Reputation: 199

 textInput.setFocus();
 textInput.selectRange(caretPosition, caretPosition);

Upvotes: 1

Related Questions