Incompatible types: got "<enumeration type>" expected "TOwnerDrawStateType"
Original Reporter info from Mantis: lingling
Description:
procedure Tform_sales.ListBox_BarcodesDrawItem(Control: TWinControl;
Index: Integer; ARect: TRect; State: TOwnerDrawState);
begin
with TListBox(Control).Canvas do
begin
font.Color := clBlack;
if index mod 2 = 0 then
brush.Color := $00EBFFEB
else
brush.Color:=clWhite;
fillrect(Arect);
pen.Color := clred;
moveto(Arect.Left,Arect.Bottom-1);
lineto(Arect.Right,Arect.Bottom-1)
end;
if (odSelected in state) then
begin
TListBox(Control).Canvas.Brush.Color :=clGreen;
TListBox(Control).Canvas.Font.Color:=clWhite;
TListBox(Control).Canvas.FillRect(Arect);
if(odFocused in State) then
DrawFocusRect(TListBox(Control).Canvas.Handle, ARect);
end; }
TListBox(Control).Canvas.TextOut(ARect.Left+2 ,ARect.Top+2 ,TListBox(Control).Items.Strings[index]);
end;
Mantis conversion info:
-
Mantis ID: 20818
-
Version: 0.9.30