Table of Contents

Property Lines

Namespace
Alternet.Editor.TextSource
Assembly
Alternet.Editor.v9.dll

Lines

Represents the object that implements ITextStrings interface containing collection of strings determining text source content.

[Browsable(false)]
public virtual ITextStrings Lines { get; set; }

Property Value

ITextStrings

Examples

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

using Alternet.Editor;
using Alternet.Editor.TextSource;

public partial class Form1 : Form
{
    private TextSource textSource;
    private void Form1_Load(object sender, EventArgs e)
    {
        var syntaxEdit = new SyntaxEdit(this.components);
        textSource = new TextSource(this.components);
        for (int i = 0; i < 100; i++)
        {
            textSource.Lines.Add(string.Format("Line No: {0}", i));
        }

        syntaxEdit.Source = this.textSource;
    }
}

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

Imports Alternet.Editor
Imports Alternet.Editor.TextSource

Partial Public Class Form1
    Inherits Form

    Private textSource As TextSource

    Private Sub Form1_Load(ByVal sender As Object, ByVal e As EventArgs)
        Dim syntaxEdit = New SyntaxEdit(Me.components)
        textSource = New TextSource(Me.components)

        For i As Integer = 0 To 100 - 1
            textSource.Lines.Add(String.Format("Line No: {0}", i))
        Next

        syntaxEdit.Source = Me.textSource
    End Sub
End Class

Remarks

Each item in the list represents a text line of the text stored by this TextSource object.