Hide

SftTree/NET 2.0 - Tree Control for Windows Forms

Display
Print

Cell Field, EditSetupEventArgs Class

The cell to be edited.

Class: EditSetupEventArgs
Namespace: Softelvdm.SftTreeNET
Assembly: Softelvdm.SftTreeNET

Syntax

public readonly CellClass Cell;
Public ReadOnly Cell As CellClass

Comments

The cell to be edited.

Examples

C#

            if (e.Cell.ColumnIndex == 0) // Can't edit the first column
                e.Allowed = false;
        }

        private void sftTree1_EditSetup(object sender, Softelvdm.SftTreeNET.EditSetupEventArgs e) {
            Debug.Write("** EditSetup");
            DumpValues(e);

            if (e.Cell.ColumnIndex == 1) {
                // We use a textbox for column 1 (remember, column 0 is not editable,
                // because of the EditAllowed event
                // set all textbox properties
                textBox1.Parent = sftTree1;     // make the tree control the parent window

                textBox1.Text = e.Cell.Text;
                int h = textBox1.Height;

VB.NET

        e.Allowed = False
    End If
End Sub

Private Sub sftTree1_EditSetup(ByVal sender As Object, ByVal e As Softelvdm.SftTreeNET.EditSetupEventArgs) Handles sftTree1.EditSetup
    Debug.Write("** EditSetup")
    DumpValues(e)

    If e.Cell.ColumnIndex = 1 Then
        ' We use a textbox for column 1 (remember, column 0 is not editable,
        ' because of the EditAllowed event
        ' set all textbox properties
        textBox1.Parent = sftTree1     ' make the tree control the parent window

        textBox1.Text = e.Cell.Text
        Dim h As Integer = textBox1.Height

See Also EditSetupEventArgs Class | Classes | SftTree/NET 2.0