I want to know how to activate a TextBox when an element of the ComboBox is selected

-1

Hello friends I have a question for you I have a combobox with three states Pending, Accepted and rejected, what I want is that when you choose Accepted I have a button enabled automatically in the form I am working in C # Windows Forms applications I thank you any help possible !! thanks!

    
asked by Edwin Casco 08.11.2017 в 20:55
source

1 answer

0

This would be the simplest way to get a button enabled by selecting a specific Item from a Combobox, remember first to leave your button Enable = false;

private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (comboBox1.SelectedItem.ToString() == "Aceptado")
            {
                button1.Enabled = true;
            }
        }
    
answered by 09.11.2017 в 01:38