So, I'm trying to put some text showing up on the ComboBox
before it has a selection made by the user.
That text should not be an item, selectable by the user.
The ComboBox has the DropDownList style on, so the user can't edit it.
This is currently what I have so far:
On the load:
this.comboBox1.Items.AddRange(new object[] {"Caixilharia em PVC", "Caixilharia em Alumínio" });
On the comboBox:
switch (comboBox1.SelectedIndex)
{
case 0:
Form2 newForm = new Form2();
newForm.Show();
this.Hide();
break;
case 1:
Form3 anothernewForm = new Form3();
anothernewForm.Show();
this.Hide();
break;
}
Now, I want to show text, as on the following image:
I don't want the text to show up here, as an Item:
The only way I managed to do this, the text also appeared as an item.
I'll be waiting for your help.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…