ImageEn, unit iexCanvasUtils

IEDrawLineEndShapeToComboListBoxItem


Declaration

procedure IEDrawLineEndShapeToComboListBoxItem(ControlCanvas: TCanvas;
                                               CanvasRect: TRect;
                                               ControlEnabled: Boolean;
                                               Shape: TIELineEndShape;
                                               PenColor, FillColor: TColor;
                                               ShowText: Boolean = True;
                                               PointRight: Boolean = True);


Description

Draw a line end shape and text to a combo box or list box.


Example

// Note: cmbShape.Style = csOwnerDrawFixed, and ideally an ItemHeight >= 18
procedure Tfmain.cmbLineEndShapeDrawItem(Control: TWinControl; Index: Integer; Rect: TRect; State: TOwnerDrawState);
begin
  IEDrawLineEndShapeToComboListBoxItem( TComboBox( Control ).Canvas, Rect, Control.Enabled, TIELineEndShape( Index ), clBlack, clRed );
end;