Question

Is there a method to set the caret position within a RichEditableText control?

The control's contents can contain errors that the user must fix which are navigated though via Next/Previous buttons, and during the navigation I would like to set the caret cursor to the end of each error within the text.

Was it helpful?

Solution

First you need to change the focus:

textField.setFocus()

Then set the positoin:

textField.selectRange()

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top