• HOME
  • PRODUCTS
  • DEMOS
  • BUY
  • BLOG
  • FORUM
  • DOCUMENTATION
  • ABOUT
  • FREE EVALUATION
Search Results for

    Show / Hide Table of Contents

    Position Property

    Position

    Gets or sets current position within the control's text content.

    Declaration
    [Browsable(false)]
    public virtual Point Position { get; set; }
    Property Value
    Type Description
    Point
    Implements
    INavigate.Position
    Remarks

    Position specifies the insertion point in column and row coordinates within the text.

    Once the text content is loaded, the Position control resets its position to the beginning of the text.

    Examples

    Here is how to use a Position in the C# code:

    public partial class Form1 : Form
    {
        private void Form1_Load(object sender, EventArgs e)
        {
            var syntaxEdit1 = new Alternet.Editor.SyntaxEdit(this.components);
            syntaxEdit1.LoadFile("myfile.txt");
            syntaxEdit1.Position = new System.Drawing.Point(0, syntaxEdit1.Lines.Count - 1);
            syntaxEdit1.MakeVisible(syntaxEdit1.Position);
        }
    }
    

    Here is how to use a Position in the Visual Basic code:

    Partial Public Class Form1
        Inherits Form
    
        Private Sub Form1_Load(ByVal sender As Object, ByVal e As EventArgs)
            Dim syntaxEdit1 = New Alternet.Editor.SyntaxEdit(Me.components)
            syntaxEdit1.LoadFile("myfile.txt")
            syntaxEdit1.Position = New System.Drawing.Point(0, syntaxEdit1.Lines.Count - 1)
            syntaxEdit1.MakeVisible(syntaxEdit1.Position)
        End Sub
    End Class
    
    In This Article
    Back to top Copyright AlterNET Software Download PDF