コード例 #1
0
ファイル: NodeRichTextBox.cs プロジェクト: tyranid/canape
        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);
        }
コード例 #2
0
ファイル: CodeEditor.cs プロジェクト: microdee/vvvv-sdk
 public void JumpTo(int line, int column)
 {
     ActiveTextAreaControl.ScrollTo(line, column);
     ActiveTextAreaControl.Caret.Line   = line;
     ActiveTextAreaControl.Caret.Column = column;
 }