[英]Want to set cursor position in Spark textinput control in Flex
I use Flex 4.5. 我使用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??
例如,如果我的变量值为5,则文本框中的光标将指向位置5。因此,有什么方法可以实现?
Thanks in Advance. 提前致谢。
textInput.setFocus();
textInput.selectRange(caretPosition, caretPosition);
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.