HeaderPane
Main
Hide
Share Link
Print

ItemClickEventArgs Class

Provides data for the ItemClick event and ItemDoubleClick event.

Namespace: Softelvdm.SftTreeNET
Assembly: Softelvdm.SftTreeNET

Inheritance

Syntax

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

Constructors

This class cannot be instantiated.

Fields

PublicAreaDefines in which area of the control the mouse click occurred.
PublicCellDefines which cell was clicked. 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 event handler.
PublicItemDefines which item was clicked. 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 was clicked. May be null/Nothing indicating that no part is associated with this event.
PublicUsageDefines in which area of the control the mouse click occurred.

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#

        private void sftTree1_HeaderHeightChanged(object sender, EventArgs e) {
            DumpValues("HeaderHeightChanged", e);
        }

        private void sftTree1_HorizontalOffsetChanged(object sender, Softelvdm.SftTreeNET.HorizontalOffsetChangedEventArgs e) {
            DumpValues("HorizontalOffsetChanged", e);
        }

        private void sftTree1_ItemClick(object sender, Softelvdm.SftTreeNET.ItemClickEventArgs e) {
            DumpValues("ItemClick", e);

            if (e.Item != null && e.Cell != null && e.Item.UsageLocation == UsageLocationEnum.items && e.Cell.ColumnIndex == 2)
                e.Cell.Edit();  // Start cell editing

        }

VB.NET

Private Sub SftTree1_HeaderHeightChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SftTree1.HeaderHeightChanged
    DumpValues("HeaderHeightChanged", e)
End Sub

Private Sub SftTree1_HorizontalOffsetChanged(ByVal sender As System.Object, ByVal e As Softelvdm.SftTreeNET.HorizontalOffsetChangedEventArgs) Handles SftTree1.HorizontalOffsetChanged
    DumpValues("HorizontalOffsetChanged ", e)
End Sub

Private Sub SftTree1_ItemClick(ByVal sender As System.Object, ByVal e As Softelvdm.SftTreeNET.ItemClickEventArgs) Handles SftTree1.ItemClick
    DumpValues("ItemClick", e)

        If Not e.Item Is Nothing And Not e.Cell Is Nothing Then
            If e.Item.UsageLocation = UsageLocationEnum.items And e.Cell.ColumnIndex = 2 Then
                e.Cell.Edit()  ' Start cell editing
            End If
        End If

See Also Classes | SftTree/NET 3.0