How do I implement an owner drawn combobox

Platform: WinForms| Category: ComboBox

You can subclass ComboBox. In your derived class, make sure you set

  this.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
  this.DropDownStyle = ComboBoxStyle.DropDownList;

You also need to handle the DrawItem event to actually implement the drawing. Check out the details in the OwnerDrawnComboBox sample.

Share with

Related FAQs

Couldn't find the FAQs you're looking for?

Please submit your question and answer.