Hide

SftTree/NET 2.0 - Tree Control for Windows Forms

Display
Print

AutoExpandDragDrop Property, SftTree Class

Defines whether items are automatically expanded during a drag & drop operation, when the mouse cursor hovers over the item for an extended period of time.

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

Syntax

public bool AutoExpandDragDrop { get; set; }
Public Property AutoExpandDragDrop As Boolean

Value

True if items are automatically expanded, otherwise False.

The default value is False.

Comments

Defines whether items are automatically expanded during a drag & drop operation, when the mouse cursor hovers over the item for an extended period of time.

During a drag & drop operation, if the mouse cursor hovers over an expandable item for an extended period of time, the item can automatically be expanded based on the SftTree.AutoExpandDragDrop property setting. Once the drag & drop operation completes, the affected items remain expanded.

The SftTree.DragDropHoverInterval property defines how long the mouse cursor hovers over an item before it is expanded.

The SftTree.AutoExpandArea can be used to define the area where items are automatically expanded.

The SftTree.AutoExpandHover property defines whether items are automatically expanded when the mouse hovers over an item (outside of a drag & drop operation).

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

VB.NET

        Next
    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

See Also SftTree Class | Classes | SftTree/NET 2.0