Page 1 of 1

Keep selection when replacing selection with InsertText?

Posted: Tue Aug 28, 2012 2:40 pm
by PeterPanino
Hi! I have a RichVieEdit RVE which has the text content, as an example, of "ABC".

"B" is selected.

Then this code:

Code: Select all

RVE.InsertText('B1');
replaces "B" with "B1",

which makes the selection disappear, of course.

So how can I keep "B1" selected in this case?

Or, if this is not possible, how do I re-select it?

Thanks.

Posted: Tue Aug 28, 2012 4:05 pm
by PeterPanino
Found the solution:

RVLinear.RVGetSelection and RVLinear.RVSetSelection