Combo box drop down width on suggest

后端 未结 3 758
予麋鹿
予麋鹿 2020-12-06 08:09

I have a form which has a Combo Box Control. I have selected the drop down style property to DropDown. I have also set the DropDown Width to 250. I have set the auto complet

3条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-06 08:47

    kind of a bad design decision to do that. Why not set it to a static large size to start with? You can always use one of the events to get the text width and then use that to set the combobox width. Possibly the onPaint? easier way might be to create your own combobox class that inherits from combo box and then override the methods to do this yourself.

提交回复
热议问题