ImageEn, unit ieXCanvasUtils

IEDrawShapeToComboListBoxItem

IEDrawShapeToComboListBoxItem


Declaration


procedure IEDrawShapeToComboListBoxItem(ControlCanvas : TCanvas;
                                        CanvasRect : TRect;
                                        ControlEnabled : Boolean;
                                        Shape: TIEShape;
                                        Color: TColor;
                                        ShowText : Boolean = True);


Description


Draw a shape and text to a combo box or list box

Note: Defined in iexCanvasUtils unit


Example


// Note: cmbShape.Style = csOwnerDrawFixed, and ideally a big ItemHeight e.g. 40
procedure Tfmain.cmbShapeDrawItem(Control: TWinControl; Index: Integer; Rect: TRect; State: TOwnerDrawState);
begin
  IEDrawShapeToComboListBoxItem( TComboBox( Control ).Canvas, Rect, Control.Enabled, TIEShape( Index ), clRed );
end;


See Also


- IEDrawShape
- IEShapeToStr