Hide

SftTree/NET 2.0 - Tree Control for Windows Forms

Display
Print

UsageLocation Property, ItemClass Class

Returns the location where this item is used.

Class: ItemClass
Namespace: Softelvdm.SftTreeNET
Assembly: Softelvdm.SftTreeNET

Syntax

public UsageLocationEnum UsageLocation { get; }
Public ReadOnly Property UsageLocation As UsageLocationEnum

Value

Comments

Returns the location where this item is used.

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 + " ";
            } else if (e.Item != null) {
                s += " an item ";

VB.NET

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
    ElseIf Not e.RowHeader Is Nothing Then
        If e.RowHeader.Text = "" Then

See Also ItemClass Class | Classes | SftTree/NET 2.0