Hide

SftTree/NET 2.0 - Tree Control for Windows Forms

Display
Print

TreeLineStyle Property, SftTree Class

Defines how tree lines are displayed.

Class: SftTree
Namespace: Softelvdm.SftTreeNET
Assembly: Softelvdm.SftTreeNET

Syntax

public TreeLineStyleEnum TreeLineStyle { get; set; }
Public Property TreeLineStyle As TreeLineStyleEnum

Value

The tree line style.

The default value is TreeLineStyleEnum.AllLevels.

Comments

Defines how tree lines are displayed.

The color used for tree lines can be defined using the SftTree.TreeLineColor property.

SftTree.TreeLinesPen defines the pen style used to draw tree lines.

Tree lines are only used in the item area and only if a hierarchy column has been defined using ColumnClass.ShowHierarchy.

Examples

C#

            m_MinusImage = Bitmap.FromFile("..\\..\\CollapsableNormal.bmp"); // a small - bitmap
            Image img = Bitmap.FromFile("..\\..\\test.gif"); // a small sample bitmap

            // 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;

VB.NET

    ' that are located on your system.
    Dim img As Image = Bitmap.FromFile("..\\..\\test.gif") ' a small sample bitmap

    ' 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

See Also SftTree Class | Classes | SftTree/NET 2.0