Posted 18 years ago
by Richard Beyer
-
KBS Leipzig
After _editor.SelectedView.InsertSurroundingText(openingTag, closingTag);
the selection gets lost. How do I select the original text again to do another .InsertSurroundingText?
greetings
Richard
EDIT: found it after starting this thread ^^[Modified at 08/24/2006 07:59 AM]
the selection gets lost. How do I select the original text again to do another .InsertSurroundingText?
greetings
Richard
EDIT: found it after starting this thread ^^
int selectionstartingposition = _editor.SelectedView.Selection.FirstOffset;
int selectionlength = _editor.SelectedView.Selection.Length;
_editor.SelectedView.InsertSurroundingText(openingTag, closingTag);
_editor.SelectedView.Selection.SelectRange(selectionstartingposition+openingTag.Length,selectionlength);