ComboBox with style csOwnerDrawFixed and Canvas.Line
Original Reporter info from Mantis: zamtmn @zamtmn
-
Reporter name: Andrey Zubarev
Original Reporter info from Mantis: zamtmn @zamtmn
- Reporter name: Andrey Zubarev
Description:
procedure TForm1._ondrwitem(Control: TWinControl; Index: Integer; ARect: TRect;
State: TOwnerDrawState);
var
y:integer;
begin
y:=(ARect.Top+ARect.Bottom)div 2;
TComboBox(Control).canvas.Line(ARect.Left,y+index*2,ARect.Left+50,y+index*2);
TComboBox(Control).canvas.Rectangle(ARect.Left,y,ARect.Left+10,y+10);
end;
This OnDrawItem procefure not working properly. Сoordinates for canvas.Line wrong, while for canvas.Rectangle correct