Hide

SftTree/NET 2.0 - Tree Control for Windows Forms

Display
Print

Width Property, RowHeadersClass Class

Defines the width of the row header area.

Class: RowHeadersClass
Namespace: Softelvdm.SftTreeNET
Assembly: Softelvdm.SftTreeNET

Syntax

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

Value

The width in pixels or 0 to hide the row header area.

The default value is 50.

Comments

Defines the width of the row header area.

The RowHeadersClass.GetOptimalWidth or RowHeadersClass.MakeOptimal methods can be used to calculate or define the optimal width for the row headers. An optimal width allows all cell contents in the row headers to be displayed in their entirety, without being clipped.

Examples

C#

            // Most of this initialization code could be eliminated by designing the control.
            sftTree1.Initializing = true;
            sftTree1.Headers.Rows = 0;
            sftTree1.Footers.Rows = 0;
            sftTree1.Dimensions.LevelIndent = 5; // indent just a few pixels for level 1 items
            sftTree1.TreeLineStyle = TreeLineStyleEnum.None;
            sftTree1.ShowExpandCollapseButtons = ShowExpandCollapseButtonsEnum.None;
            sftTree1.RowHeaders.Width = 0;
            sftTree1.ShowFocusRectangle = false;
            sftTree1.ItemClick += sftTree1_ItemClick;
            sftTree1.ItemDoubleClick += sftTree1_ItemDoubleClick;
            sftTree1.ShowToolTip += new SftTree.ShowToolTipEventHandler(sftTree1_ShowToolTip);
            sftTree1.ToolTip.ShowAlways = true;
            sftTree1.ToolTip.Style = ToolTipAppearanceEnum.Balloon;

            ItemClass cat;

VB.NET

    ' Most of this initialization code could be eliminated by designing the control.
    sftTree1.Initializing = True
    sftTree1.Headers.Rows = 0
    sftTree1.Footers.Rows = 0
    sftTree1.Dimensions.LevelIndent = 5 ' indent just a few pixels for level 1 items
    sftTree1.TreeLineStyle = TreeLineStyleEnum.None
    sftTree1.ShowExpandCollapseButtons = ShowExpandCollapseButtonsEnum.None
    sftTree1.RowHeaders.Width = 0
    sftTree1.ShowFocusRectangle = False
    sftTree1.ToolTip.ShowAlways = True
    sftTree1.ToolTip.Style = ToolTipAppearanceEnum.Balloon

    Dim cat As ItemClass
    cat = AddCategory("Category 1")
     AddItem(cat, img, "Item 1")
     AddItem(cat, img, "Item 2")

See Also RowHeadersClass Class | Classes | SftTree/NET 2.0