Serialcoder en Français Serialcoder in English
TEL : +33 (0)9 72 13 15 17

Windows Forms FAQ resources

21. Windows Forms ComboBox

21.5 How do I implement an owner drawn 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.