Keep selection when replacing selection with InsertText?

General TRichView support forum. Please post your questions here
Post Reply
PeterPanino
Posts: 57
Joined: Tue Jul 13, 2010 10:50 pm

Keep selection when replacing selection with InsertText?

Post 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.
PeterPanino
Posts: 57
Joined: Tue Jul 13, 2010 10:50 pm

Post by PeterPanino »

Found the solution:

RVLinear.RVGetSelection and RVLinear.RVSetSelection
Post Reply