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.