Creating DropDownList style icon combobox(not editable) is not difficult.
You just set DrawMode to OwnerDrawFixed or OwnerDrawVariable,
then hook up the MeasureItem and DrawItem events.
On the other hand, creating icon combobox with editable text box is really difficult.
Because .net framework don't allow changing margin of editable portion
of combobox, and overriding OnPaint method of combobox.
I found good sample code to create an icon combobox with editable textbox.
He use Win32API to solve the problems. It's tough work!
The sample code and DLL are for .NET 1.1.
However, I think this technique could be applied for .net 3.0/3.5.
Does anyone know the code written by .net 3.0/3.5?
If you are using my combobox
, creating editable combobox is easy.
You just set DrawMode and TextLeftMargin propeties, hook up DrawItem event and override OnPaint method.