Fuzz Evans Fuzz Evans - 4 years ago 134
C# Question

How do I clear a combobox?

I have some combo-boxes that are set up as drop down lists, and the user can pick a number in them. I also have a Clear button that should clear the text from the combo boxes but I can't seem to get it. I've tried:

//doesn't work
cboxHour.Text = "";


//doesn't work

This seems like it should be so straight forward but I'm just not getting it.

Answer Source

Did you try cboxHour.Items.Clear()?

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download