Insert new text and keeping the selecion
Posted: Tue Apr 27, 2010 12:37 pm
Hello,
I need to do some processing in a selected text and after that (the text will have the same length as before) keep the selection. I tried doing that:
Unfortunatelly this did not work. I tried looking other topics about similar situation but found nothing. How can I do that?
Thanks for any help.
I need to do some processing in a selected text and after that (the text will have the same length as before) keep the selection. I tried doing that:
Code: Select all
rv.Format;
rv.GetSelectionBounds(StartItemNo,StartItemOffs,EndItemNo,EndItemOffs,false);
work_str := rv.GetSelText;
...
(Do some text processing on 'work_str')
...
rv.InsertText(work_str,true);
rv.Format;
rv.SetSelectionBounds(StartItemNo,StartItemOffs,EndItemNo,EndItemOffs);
Thanks for any help.