简体   繁体   English

Apache Pivot TextArea / TextInput插入符号位置

[英]Apache Pivot TextArea / TextInput caret position

I am not able to find, how can I get caret position of Apache Pivot TextArea and TextInput. 我找不到,如何获得Apache Pivot TextArea和TextInput的插入位置。

Also I need to add a caret listener or something like that to them. 另外,我需要向他们添加插入符号侦听器或类似的内容。

The last thing I need to know is how to get caret position of these components by the point, where I clicked by mouse? 我需要知道的最后一件事是如何通过鼠标单击的位置来获得这些组件的插入符位置。

Is there any solution? 有什么解决办法吗?

Thanks 谢谢

I think I finally found the solution. 我想我终于找到了解决方案。 Method getSelectionStart() on TextArea does return also caret position in situation when nothing is selected. 在未选择任何内容的情况下,TextArea上的方法getSelectionStart()也会返回插入符位置。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM