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
public bool AutoExpandDragDrop { get; set; }
Public Property AutoExpandDragDrop As BooleanTrue if items are automatically expanded, otherwise False.
The default value is False.
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).
private void CloseButton_Click(object sender, EventArgs e) {
Close();
}
private void Form1_Load(object sender, EventArgs e) {
sftTree1.Initializing = true;
sftTree1.AllowDrop = true;
sftTree1.AutoExpandDragDrop = true;
sftTree1.Columns.Count = 2;
sftTree1.Headers[0, 0].Text = "Left Tree Control";
for (int c = 1; c < sftTree1.Columns.Count; ++c) {
sftTree1.Headers[0, c].Text = "Column " + c.ToString();
}
for (int i = 0; i < 100; ++i) {
ItemClass itemParent = sftTree1.ItemCollection.Add(new string[] { "Item " + i.ToString(), "Cell 1 in Item " + i.ToString(), "Cell 2 in Item " + i.ToString() } );
itemParent.RowHeader.Text = i.ToString();
Private Sub CloseButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CloseButton.Click
Close()
End Sub
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
SftTree1.Initializing = True
SftTree1.AllowDrop = True
SftTree1.AutoExpandDragDrop = True
SftTree1.Columns.Count = 2
SftTree1.Headers(0, 0).Text = "Left Tree Control"
For c As Integer = 1 To SftTree1.Columns.Count - 1
SftTree1.Headers(0, c).Text = "Column " + c.ToString()
Next
For i As Integer = 0 To 100 - 1
Dim itemParent As ItemClass = SftTree1.ItemCollection.Add(New String() {"Item " + i.ToString(), "Cell 1 in Item " + i.ToString(), "Cell 2 in Item " + i.ToString()})
itemParent.RowHeader.Text = i.ToString()See Also SftTree Class | Classes | SftTree/NET 3.0