Hide

SftTree/NET 2.0 - Tree Control for Windows Forms

Display
Print

Cell Field, ItemClickEventArgs Class

Defines which cell was clicked. May be null/Nothing indicating that no cell is associated with this event.

Class: ItemClickEventArgs
Namespace: Softelvdm.SftTreeNET
Assembly: Softelvdm.SftTreeNET

Syntax

public readonly CellClass Cell;
Public ReadOnly Cell As CellClass

Comments

Defines which cell was clicked. May be null/Nothing indicating that no cell is associated with this event.

Examples

C#

            Debug.Write("** EditEnded");
            DumpValues(e);

        }
        private void sftTree1_ItemClick(object sender, Softelvdm.SftTreeNET.ItemClickEventArgs e) {
            Debug.Write("** ItemClick");
            DumpValues(e);
            if (e.Area == Softelvdm.SftTreeNET.ItemClickAreaEnum.CellSel)
                e.Cell.Edit();  // Start cell editing
        }


        // Handle all the cell navigation for the text box here
        private void textBox1_KeyDown(object sender, KeyEventArgs e) {
            if (e.KeyCode == Keys.Up) {
                sftTree1.EditNavigate(EditNavigateEnum.Up);

VB.NET

    Debug.Write("** EditEnded")
    DumpValues(e)
End Sub

Private Sub sftTree1_ItemClick(ByVal sender As Object, ByVal e As Softelvdm.SftTreeNET.ItemClickEventArgs) Handles sftTree1.ItemClick
    Debug.Write("** ItemClick")
    DumpValues(e)
    If e.Area = ItemClickAreaEnum.CellSel Then
        e.Cell.Edit()  ' Start cell editing
    End If
End Sub

Private Sub textBox1_KeyDown(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles textBox1.KeyDown
    If e.KeyCode = Keys.Up Then
        sftTree1.EditNavigate(EditNavigateEnum.Up)
        e.Handled = True

See Also ItemClickEventArgs Class | Classes | SftTree/NET 2.0