简体   繁体   中英

Is there any way to change the background color of the ComboBox control with DropDownList in Windows Forms

Is there any way to change the background color of the ComboBox control with DropDownStyle = DropDownList in Windows Forms?

If I just do

this.comboBox.BackColor = Color.Red;

nothing changed.

I need to highlight this ComboBox when the user doesn't choose any item (I can't provide the default item in my case).

Thanks in advance.

您还需要将DrawMode设置为OwnerDrawFixed

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM