ImageEn, unit iexCanvasUtils

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
// It should be filled with items to match the number of TIEShapes
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
AddShapesToImageEnMView
IEDrawGradientToComboListBoxItem
IEDrawComboListBoxItem