/// <summary> /// Sets the cursor to the first position of the given line. /// </summary> /// <param name="codePane"></param> /// <param name="lineNumber"></param> public static void SetSelection(this CodePane codePane, int lineNumber) { var line = codePane.CodeModule.Lines[lineNumber, 1]; var selection = new Selection(lineNumber, 1, lineNumber, line.Length); codePane.SetSelection(selection); }
public void SetSelection(int startLine, int startColumn, int endLine, int endColumn) { _codePane.SetSelection(startLine, startColumn, endLine, endColumn); }
/// <summary> /// /// </summary> /// <param name="codePane"></param> /// <param name="selection"></param> public static void SetSelection(this CodePane codePane, Selection selection) { codePane.SetSelection(selection.StartLine, selection.StartColumn, selection.EndLine, selection.EndColumn); codePane.ForceFocus(); }