Search code examples
javaapache-pivotgetcaretpos

Apache Pivot TextArea / TextInput caret position


I am not able to find, how can I get caret position of Apache Pivot TextArea and 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


Solution

  • I think I finally found the solution. Method getSelectionStart() on TextArea does return also caret position in situation when nothing is selected.