I was really looking for ways to programmatically select the line the user was on.
I noticed that no matter where the caret is placed, the rich editor's Caret.XY.X and Y properties return -10 and -1000, respectively.
Why?
Hi,
When the focus moves away from the rich editor the caret is no longer valid. If you read the properties inside a timer, keeping the focus on the rich editor the values are correct. If you want ot programmatically select a line using the caret, you will need to set the CanFocus property to false of the button you are using to execute the selection statement.
Kind Regards,
Pieter
Thanks!