Hide

SftTree/NET 2.0 - Tree Control for Windows Forms

Display
Print

RowHeader Field, DragDetectedEventArgs Class

Defines which row header is being dragged. May be null/Nothing indicating that no row header is associated with this event.

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

Syntax

public readonly RowHeaderClass RowHeader;
Public ReadOnly RowHeader As RowHeaderClass

Comments

Defines which row header is being dragged. May be null/Nothing indicating that no row header is associated with this event.

Examples

C#

            // 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 + " ";
            } else if (e.Item != null) {
                s += " an item ";
            }
            e.Handled = true;
            sftTree1.DoDragDrop(s, DragDropEffects.Copy);
        }

VB.NET

    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
    ElseIf Not e.RowHeader Is Nothing Then
        If e.RowHeader.Text = "" Then
            s = s & "(empty row header) "
        Else
            s = s & e.RowHeader.Text & " "
        End If
    ElseIf Not e.Item Is Nothing Then
        s = s & " an item "

See Also DragDetectedEventArgs Class | Classes | SftTree/NET 2.0



Spring Break!

Our offices will be closed this week (March 18 through March 22).

We'll be back March 24 to address any pending sales and support issues.