How do I clear a combobox?

前端 未结 16 1801
醉梦人生
醉梦人生 2020-12-04 18:55

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 boxe

16条回答
  •  南方客
    南方客 (楼主)
    2020-12-04 19:39

    This worked for me when I added ComboBox.Focus()

    ComboBox.Items.Clear();
    ComboBox.ResetText();
    ComboBox.Focus();
    

提交回复
热议问题