Hide

SftTree/NET 2.0 - Tree Control for Windows Forms

Display
Print

AutoExpandAreaEnum Enumeration

Used with the SftTree.AutoExpandArea property to define when items are expanded automatically (see SftTree.AutoExpandHover and SftTree.AutoExpandDragDrop).

Class: (none)
Namespace: Softelvdm.SftTreeNET
Assembly: Softelvdm.SftTreeNET

Syntax

public enum AutoExpandAreaEnum;
Public Enum AutoExpandAreaEnum

Values

NameDescription
FirstColumn(not specified)
HierarchyColumnThe item is automatically expanded if the mouse cursor hovers over the cell of the hierarchy column (excluding the hierarchy area).
AllColumnsThe item is automatically expanded if the mouse cursor hovers over any cell (excluding the hierarchy area).

Comments

Used with the SftTree.AutoExpandArea property to define when items are expanded automatically (see SftTree.AutoExpandHover and SftTree.AutoExpandDragDrop).

Examples

C#

            }
            sftTree1.ItemCollection.Collapse(CollapseStyleEnum.All);
            sftTree1.Columns.MakeOptimal(0, false);
            sftTree1.RecalcHorizontalExtent();

            // We need to set up the tree control as a drop target
            sftTree1.AllowDrop = true;
            sftTree1.AutoExpandDragDrop = true;
            sftTree1.AutoExpandArea = AutoExpandAreaEnum.AllColumns;
            sftTree1.Initializing = false;

            // We also need to set up the text box so we can drop data
            textBox1.AllowDrop = true;
        }

        private void sftTree1_DragDetected(object sender, DragDetectedEventArgs e) {

VB.NET

    Next
    sftTree1.ItemCollection.Collapse(CollapseStyleEnum.All)
    sftTree1.Columns.MakeOptimal(0, False)
    sftTree1.RecalcHorizontalExtent()

    ' We need to set up the tree control as a drop target
    sftTree1.AllowDrop = True
    sftTree1.AutoExpandDragDrop = True
    sftTree1.AutoExpandArea = AutoExpandAreaEnum.AllColumns
    sftTree1.Initializing = False

    ' We also need to set up the text box so we can drop data
    textBox1.AllowDrop = True
End Sub

Private Sub sftTree1_DragDetected(ByVal sender As Object, ByVal e As Softelvdm.SftTreeNET.DragDetectedEventArgs) Handles sftTree1.DragDetected

See Also | Classes | SftTree/NET 2.0