HeaderPane
Main
Hide
Share Link
Print

DragDetectedEventArgs Class

Provides data for the DragDetected event.

Namespace: Softelvdm.SftTreeNET
Assembly: Softelvdm.SftTreeNET

Inheritance

Syntax

public class DragDetectedEventArgs : System.EventArgs;
Public Class DragDetectedEventArgs
    Inherits System.EventArgs

Constructors

This class cannot be instantiated.

Fields

PublicAreaDefines in which area of the control the drag operation was detected.
PublicCellDefines which cell is being dragged. May be null/Nothing indicating that no cell is associated with this event.
PublicStaticInherited from System.EventArgsEmptyProvides a value to use with events that do not have event data.
PublicHandledDefines whether the event handler handled the event. This value can be modified by the DragDetected event handler.
PublicItemDefines which item is being dragged. May be null/Nothing indicating that no item is associated with this event.
PublicMouseEvThe original mouse event data associated with this event.
PublicPartDefines which part is being dragged. May be null/Nothing indicating that no part is associated with this event.
PublicRowHeaderDefines which row header is being dragged. May be null/Nothing indicating that no row header is associated with this event.

Methods

PublicInherited from System.ObjectEqualsDetermines whether the specified object is equal to the current object.
ProtectedInherited from System.ObjectFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
PublicInherited from System.ObjectGetHashCodeServes as the default hash function.
PublicInherited from System.ObjectGetTypeGets the Type of the current instance.
ProtectedInherited from System.ObjectMemberwiseCloneCreates a shallow copy of the current Object.
PublicStaticInherited from System.ObjectReferenceEqualsDetermines whether the specified Object instances are the same instance.
PublicInherited from System.ObjectToStringReturns a string that represents the current object.

Examples

C#

                child = item.Add(new string[] { "Item " + i.ToString(), "Cell 1 in Item " + i.ToString(), "Cell 2 in Item " + i.ToString() });
                child.RowHeader.Text = i.ToString();
            }
            sftTree2.Columns.MakeOptimal(0, false);
            sftTree2.RecalcHorizontalExtent();
            sftTree2.Initializing = false;
        }

        private void sftTree1_DragDetected(object sender, DragDetectedEventArgs e) {
            Debug.Write("sftTree1_DragDetected ");
            DumpValues(e);
            // get the current item
            if (e.Item == null) return;
            ItemClass item = e.Item;
            // don't drag headers, footers
            if (item.UsageLocation != UsageLocationEnum.items) 

VB.NET

        child = item.Add(New String() {"Item " + i.ToString(), "Cell 1 in Item " + i.ToString(), "Cell 2 in Item " + i.ToString()})
        child.RowHeader.Text = i.ToString()
    Next
    SftTree2.Columns.MakeOptimal(0, False)
    SftTree2.RecalcHorizontalExtent()
    SftTree2.Initializing = False
End Sub

Private Sub sftTree1_DragDetected(ByVal sender As System.Object, ByVal e As Softelvdm.SftTreeNET.DragDetectedEventArgs) Handles SftTree1.DragDetected
    Debug.Write("sftTree1_DragDetected ")
    DumpValues(e)
    ' get the current item
    If e.Item Is Nothing Then Return
    Dim item As ItemClass = e.Item
    ' don't drag headers, footers
    If item.UsageLocation <> UsageLocationEnum.items Then Return

See Also Classes | SftTree/NET 3.0