I have:
- 2 RadioButton
- 1 ComboBox
- 1 TextBox
The value of% chosen% goes to radiobutton
plus value TextBox
.
TextBox = RadioButton + Combobox
However, if I change, the value of Combobox
, Radiobutton
does not change, you are changing the value of Textbox
if you change from Textbox
or Radiobutton
.
Code :
private void combobox1_SelectedIndexChanged(object sender, EventArgs e)
{
if (radiobutton1.Checked && combobox1.Text == "Cerfificação (CER)")
{
textbox1.Text = "CER" + " SRV";
}
if (radiobutton1.Checked && combobox1.Text == "Desenvolvimento (DES)")
{
textbox1.Text = "DES" + " SRV";
}
if (radiobutton2.Checked && combobox1.Text == "Desenvolvimento (DES)")
{
textbox1.Text = "DES" + " CLI";
}