Hide

SftTree/NET 2.0 - Tree Control for Windows Forms

Display
Print

EditControl Field, EditSetupEventArgs Class

Defines the control used for cell editing. This value can be modified by the EditSetup event handler.

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

Syntax

public Control EditControl;
Public EditControl As Control

Comments

Defines the control used for cell editing. This value can be modified by the EditSetup event handler.

Examples

C#

                // make it visible and enable it
                textBox1.Enabled = true;
                textBox1.Visible = true;

                // off we go!
                textBox1.BringToFront();
                textBox1.Focus();
                e.EditControl = textBox1;
            } else if (e.Cell.ColumnIndex == 2) {
                // We use a combobox for column 2
                comboBox1.Parent = sftTree1;

                comboBox1.Items.Clear();
                comboBox1.Items.AddRange(new string[] { "Selection 1", "Selection 2", "Selection 3", "Selection 4", "Selection 5" });

                comboBox1.Text = e.Cell.Text;

VB.NET

        ' make it visible and enable it
        textBox1.Enabled = True
        textBox1.Visible = True

        ' off we go!
        textBox1.BringToFront()
        textBox1.Focus()
        e.EditControl = textBox1

    ElseIf e.Cell.ColumnIndex = 2 Then

        ' We use a combobox for column 2
        comboBox1.Parent = sftTree1

        comboBox1.Items.Clear()
        comboBox1.Items.AddRange(New String() {"Selection 1", "Selection 2", "Selection 3", "Selection 4", "Selection 5"})

See Also EditSetupEventArgs Class | Classes | SftTree/NET 2.0