ImageEn, unit iexCanvasUtils |
|
IEDrawComboListBoxItem
Declaration
procedure IEDrawComboListBoxItem(ControlCanvas: TCanvas;
CanvasRect: TRect;
ControlEnabled: Boolean;
Text: string;
AnImageList: TCustomImageList = nil;
iGlyph: Short = -1); overload;
procedure IEDrawComboListBoxItem(ControlCanvas: TCanvas;
CanvasRect: TRect;
ControlEnabled: Boolean;
Text: string;
Bmp: TIEBitmap;
BmpW, BmpH: Integer;
ZoomFilter: TResampleFilter = rfFastlinear); overload;
Description
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;
See Also
◼IEDrawShapeToComboListBoxItem
◼IEDrawGradientToComboListBoxItem