First, there is a ready-made control: tcomboboxex, there is no need to use tcombobox; you have to add it on the basis of tcombobox.
VaR
Bits: array [0 .. 3] of tbitmap;
Procedure tform1.formcreate (Sender: tobject );
VaR
I: integer;
Begin
For I: = 0 to length (BITs)-1 do
Begin
Bits [I]: = tbitmap. Create;
IL1. getbitmap (I, BITs [I]);
Cbb1. Items. Add (format ('item % d', [I]);
End;
Cbb1.style: = csownerdrawvariable;
Cbb1.itemheight: = bits [0]. height + 4;
Cbb1.itemindex: = 2;
End;
Procedure tform1.formdestroy (Sender: tobject );
VaR
I: integer;
Begin
For I: = 0 to length (BITs)-1 do
Bits [I]. Free;
End;
procedure tform1.cbb1drawitem (Control: twincontrol; index: integer;
rect: trect; State: townerdrawstate );
begin
cbb1. canvas. fillrect (rect);
cbb1. canvas. brushcopy (bounds (rect. left + 2, rect. top + 2, BITs [Index]. width, BITs [Index]. height),
bits [Index],
bounds (0, 0, BITs [Index]. width, BITs [Index]. height),
clblack);
cbb1.canvas. textout (rect. left + 24, rect. top + 3, cbb1. items [Index]);
End;
End.