Draw text and/or image to a TComboBox or TListBox.
Note: ◼TComboBox.Style should be csOwnerDrawFixed and ItemHeight set larger than your images ◼TListBox.Style should be lbOwnerDrawFixed and ItemHeight set larger than your images ◼Defined in iexCanvasUtils unit
// Note: ComboBox1.Style = csOwnerDrawFixed and ItemHeight = 18 // ImageList1 contains a list of 16x16 images that match the items of ComboBox1 procedure TfrmMain.ComboBox1DrawItem(Control: TWinControl; Index: Integer; Rect: TRect; State: TOwnerDrawState); begin IEDrawComboListBoxItem( TCombobox(Control).Canvas, Rect, Control.Enabled, TCombobox(Control).Items[ Index ], ImageList1, Index ); end;