Hide

SftTree/NET 2.0 - Tree Control for Windows Forms

Display
Print

Part Field, ActionEventArgs Class

The part generating this event.

Class: ActionEventArgs
Namespace: Softelvdm.Controls
Assembly: Softelvdm.SftTreeNET

Syntax

public readonly GenericPartClass Part;
Public ReadOnly Part As GenericPartClass

Comments

The part generating this event.

Examples

C#

            sftTree1.Columns.MakeOptimal(0, false);
            sftTree1.RecalcHorizontalExtent();
            sftTree1.Initializing = false;
        }

        // Dropdown button Action event
        void ddp_Action(object sender, ActionEventArgs e) {
            DropDownButtonPartClass ddp = (DropDownButtonPartClass)e.Part;
            MessageBox.Show("Dropdown button clicked.");
        }

        // Button part Action event
        void bp_Action(object sender, ActionEventArgs e) {
            // this is our button that was just clicked
            ButtonPartClass bp = (ButtonPartClass)e.Part;
            // this is the cell containing the button

VB.NET

    sftTree1.Columns.MakeOptimal(0, False)
    sftTree1.RecalcHorizontalExtent()
    sftTree1.Initializing = False
End Sub

' Dropdown button Action event
Private Sub ddp_Action(ByVal sender As Object, ByVal e As ActionEventArgs)
    Dim ddp As DropDownButtonPartClass = e.Part
    MessageBox.Show("Dropdown button clicked.")
End Sub

' Button part Action event
Private Sub bp_Action(ByVal sender As Object, ByVal e As ActionEventArgs)
    ' this is our button that was just clicked
    Dim bp As ButtonPartClass = e.Part
    ' this is the cell containing the button

See Also ActionEventArgs Class | Classes | SftTree/NET 2.0