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

    Show / Hide Table of Contents

    DisplayLines Property

    DisplayLines

    Represents the object that implements IDisplayStrings interface containing collection of lines to be drawn in the control.

    Declaration
    [Browsable(false)]
    public virtual IDisplayStrings DisplayLines { get; }
    Property Value
    Type Description
    IDisplayStrings
    Implements
    ISyntaxEdit.DisplayLines
    Remarks

    The DisplayLines collection may differ from Lines that contains text lines. Some of these lines may be absent due to the collapsing of the outline sections, and extra lines may appear due to the word wrapping.

    Examples

    Here is how to use a DisplayLines 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.DisplayLines.AllowHiddenLines = true;
            for (int i = 5; i <= syntaxEdit1.Source.Lines.Count - 5; i++)
            {
                syntaxEdit1.Source.SetLineHidden(i, true);
            }
        }
    }
    

    Here is how to use a DisplayLines 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.DisplayLines.AllowHiddenLines = True
    
            For i As Integer = 5 To syntaxEdit1.Source.Lines.Count - 5
                syntaxEdit1.Source.SetLineHidden(i, True)
            Next
        End Sub
    End Class
    
    In This Article
    Back to top Copyright AlterNET Software Download PDF