Hide

SftTree/NET 2.0 - Tree Control for Windows Forms

Display
Print

MaxLines Property, HeadersClass Class

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

Class: HeadersClass
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 headers 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 headers.

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

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

Examples

C#

            }
            // End of initialization

            // In this sample, vertical merging is based on empty subordinate cells.
            sftTree1.MergeStyle = MergeStyleEnum.EmptyCells;

            // Merge all cells in the column header vertically (in the second column)
            // clear the text in all subordinate cells except for the first, main cell
            sftTree1.Headers.MaxLines = 4; // allow up to 4 text lines 
            for (int r = 0; r < sftTree1.Headers.Rows; ++r) {
                cell = sftTree1.Headers[r, 1];
                cell.MergeWithLower = BoolOptionalEnum.True;
                cell.AllowMergeFromUpper = BoolOptionalEnum.True;
                cell.Parts.Clear();
            }
            TextPartClass tp = new TextPartClass("Vertical");

VB.NET

    Next
    ' End of initialization

    ' In this sample, vertical merging is based on empty subordinate cells.
    sftTree1.MergeStyle = MergeStyleEnum.EmptyCells

    ' Merge all cells in the column header vertically (in the second column)
    ' clear the text in all subordinate cells except for the first, main cell
    sftTree1.Headers.MaxLines = 4 ' allow up to 4 text lines 
    For r As Integer = 0 To sftTree1.Headers.Rows - 1
        cell = sftTree1.Headers(r, 1)
        cell.MergeWithLower = BoolOptionalEnum.True
        cell.AllowMergeFromUpper = BoolOptionalEnum.True
        cell.Parts.Clear()
    Next
    Dim tp As TextPartClass = New TextPartClass("Vertical")

See Also HeadersClass Class | Classes | SftTree/NET 2.0



Spring Break!

Our offices will be closed this week (March 18 through March 22).

We'll be back March 24 to address any pending sales and support issues.