PDA

Click to See Complete Forum and Search --> : [RESOLVED] ComboBox's


Fromethius
Mar 25th, 2006, 08:45 PM
Hey guys. Got a hopefully simple question. I have a DropDownStyle as DropDownList so you can only select things and not type but here's the problem:

I have 2 combobox's and I want it so when you click one, the other one is blank so you don't get confused on which one you're using. However, 2ndcombobox.Text = ""; doesn't work cause it is DropDownList. Is there like a clear function or something?

Thanks!

{FPP}
Mar 25th, 2006, 09:16 PM
This will work


comboBox1.Items.Clear();

Fromethius
Mar 25th, 2006, 09:20 PM
Well.. This gets rid of all of them as well. I want to still be able to select them again. I don't want it to dissapear from the choices

iPrank
Mar 25th, 2006, 10:17 PM
void ComboBox1SelectedIndexChanged(object sender, System.EventArgs e)
{
comboBox2.SelectedIndex=-1;

}

Fromethius
Mar 25th, 2006, 10:28 PM
Thanks!