Editor for WinForms | ComponentOne
C1.Win.C1Editor.4.8 Assembly / C1.Win.C1Editor Namespace / C1TextRange Class / Select Method
Example

In This Topic
    Select Method (C1TextRange)
    In This Topic
    Moves selection to the current text range.
    Syntax
    'Declaration
     
    Public Sub Select() 
    public void Select()
    Example
    The following example replaces the selected text with a new value and moves selection to the end of the new text.
    C1TextRange range = _editor.Selection.Clone();
    range.Text = value;
    //after inserting text we must collapse selection to the end
    range.Normalize();
    range.Start.MoveTo(range.End);
    range.Select();
    See Also