Combo Box Size Issue After All Items Are Removed

前端 未结 4 859
梦毁少年i
梦毁少年i 2021-01-13 04:37

My application contains a ComboBox that the user can delete items from. When the program starts up it populates the ComboBox from a list of strings read in from a configurat

4条回答
  •  说谎
    说谎 (楼主)
    2021-01-13 05:24

    I know this is an old post, but it took me a long time to figure this out and I wanted to let anyone in the future know. After you clear your combo box just do a blank add items and it resets the height.

    comboBox1.Items.Clear();
    comboBox1.Items.Add("");
    

提交回复
热议问题