private void SetSelection(int index, int length) { ActiveTextAreaControl.SelectionManager.ClearSelection(); TextLocation startSelection = ActiveTextAreaControl.Document.OffsetToPosition(index); TextLocation endSelection = ActiveTextAreaControl.Document.OffsetToPosition(index + length); ActiveTextAreaControl.SelectionManager.SetSelection(startSelection, endSelection); ActiveTextAreaControl.Caret.Position = startSelection; ActiveTextAreaControl.ScrollTo(startSelection.Line, startSelection.Column); }
public void JumpTo(int line, int column) { ActiveTextAreaControl.ScrollTo(line, column); ActiveTextAreaControl.Caret.Line = line; ActiveTextAreaControl.Caret.Column = column; }