Hide

SftTree/NET 2.0 - Tree Control for Windows Forms

Display
Print

MaxLines Property, FootersClass Class

Defines the maximum number of text lines to be displayed by column footers.

Class: FootersClass
Namespace: Softelvdm.SftTreeNET
Assembly: Softelvdm.SftTreeNET

Syntax

public int MaxLines { get; set; }
Public Property MaxLines As Integer

Value

The maximum number of text lines to be displayed by column footers or 0 if there is no limit.

The default value is 1.

Comments

Defines the maximum number of text lines to be displayed by column footers.

The TextPartClass class honors this property and never displays more than the defined number of text lines for column footers.

When designing additional parts (derived from GenericPartClass or from TextPartClass), make sure to honor this property.

Examples

C#

            // Horizontally merge column header cells in row 1, columns 3 + 4
            sftTree1.Headers[1, 3].MergeWithNext = BoolOptionalEnum.True;
            sftTree1.Headers[1, 4].AllowMergeFromPrevious = BoolOptionalEnum.True;
            sftTree1.Headers[1, 3].Text = "Horizontally merged cells";
            sftTree1.Headers[1, 3].Image = img;
            sftTree1.Headers[1, 4].Parts.Clear();

            // Vertically merge some cells in the column footer (in the last column)
            sftTree1.Footers.MaxLines = 4; // allow up to 4 text lines 
            for (int r = 1; r < sftTree1.Footers.Rows; ++r) {
                cell = sftTree1.Footers[r, 4];
                cell.MergeWithLower = BoolOptionalEnum.True;
                cell.AllowMergeFromUpper = BoolOptionalEnum.True;
                cell.Parts.Clear();
            }
            sftTree1.Footers[1, 4].Parts.Add(new ImagePartClass(img));

VB.NET

    ' Horizontally merge column header cells in row 1, columns 3 + 4
    sftTree1.Headers(1, 3).MergeWithNext = BoolOptionalEnum.True
    sftTree1.Headers(1, 4).AllowMergeFromPrevious = BoolOptionalEnum.True
    sftTree1.Headers(1, 3).Text = "Horizontally merged cells"
    sftTree1.Headers(1, 3).Image = img
    sftTree1.Headers(1, 4).Parts.Clear()

    ' Vertically merge some cells in the column footer (in the last column)
    sftTree1.Footers.MaxLines = 4 ' allow up to 4 text lines 
    For r As Integer = 1 To sftTree1.Footers.Rows - 1
        cell = sftTree1.Footers(r, 4)
        cell.MergeWithLower = BoolOptionalEnum.True
        cell.AllowMergeFromUpper = BoolOptionalEnum.True
        cell.Parts.Clear()
    Next
    sftTree1.Footers(1, 4).Parts.Add(New ImagePartClass(img))

See Also FootersClass Class | Classes | SftTree/NET 2.0