Winforms: how to open combobox properly?

后端 未结 5 1031
醉梦人生
醉梦人生 2020-12-06 16:26

I have a combobox on the winforms. On Enter even I open it:

cbo.DroppedDown = true;

But if I do that the combo opens and closes immediately

5条回答
  •  刺人心
    刺人心 (楼主)
    2020-12-06 16:53

    I think you just need to focus it first before open the comboBox.

    cbo.Focus();
    cbo.DroppedDown = True
    

    Hope it works for you.

提交回复
热议问题