Editor for WinForms | ComponentOne
C1.Win.C1Editor.4.5.2 Assembly / C1.Win.C1Editor Namespace / C1TextRange Class / MoveTo Method
The target node where the C1TextRange object will be moved.
Example

In This Topic
    MoveTo Method (C1TextRange)
    In This Topic
    Moves the C1TextRange object to the specified System.Xml.XmlNode.
    Syntax
    'Declaration
     
    Public Sub MoveTo( _
       ByVal node As System.Xml.XmlNode _
    ) 
    public void MoveTo( 
       System.Xml.XmlNode node
    )

    Parameters

    node
    The target node where the C1TextRange object will be moved.
    Example
    The following example selects the first paragraph in the document.
    private void button1_Click(object sender, EventArgs e)
    {
       XmlNode p0 = c1Editor1.Document.GetElementsByTagName("p")[0];
       C1TextRange range = c1Editor1.CreateRange();
       range.MoveTo(p0);
       range.Select();
    }
    See Also