Hide

SftTree/NET 2.0 - Tree Control for Windows Forms

Display
Print

Area Field, DragDetectedEventArgs Class

Defines in which area of the control the drag operation was detected.

Class: DragDetectedEventArgs
Namespace: Softelvdm.SftTreeNET
Assembly: Softelvdm.SftTreeNET

Syntax

public readonly ItemClickAreaEnum Area;
Public ReadOnly Area As ItemClickAreaEnum

Comments

Defines in which area of the control the drag operation was detected.

Examples

C#

        }

        private void sftTree1_DragDetected(object sender, DragDetectedEventArgs e) {
            Debug.Print("We're starting to drag something");
            DumpValues(e);

            // based on what we are dragging, make up a string
            string s = "";
            s = e.Area.ToString() + " in ";
            s += e.Item.UsageLocation.ToString() + ": ";
            if (e.Cell != null) {
                if (e.Cell.Text == "") s += "(empty cell) ";
                else s += e.Cell.Text + " ";
            } else if (e.RowHeader != null) {
                if (e.RowHeader.Text == "") s += "(empty row header) ";
                else s += e.RowHeader.Text + " ";

VB.NET

End Sub

Private Sub sftTree1_DragDetected(ByVal sender As Object, ByVal e As Softelvdm.SftTreeNET.DragDetectedEventArgs) Handles sftTree1.DragDetected
    Debug.Print("We're starting to drag something")
    DumpValues(e)

    ' based on what we are dragging, make up a string
    Dim s As String = ""
    s = e.Area.ToString() & " in "
    s = s & e.Item.UsageLocation.ToString() & ": "
    If Not e.Cell Is Nothing Then
        If e.Cell.Text = "" Then
            s = s & "(empty cell) "
        Else
            s = s & e.Cell.Text & " "
        End If

See Also DragDetectedEventArgs Class | Classes | SftTree/NET 2.0