hi,all!i'm looking for a way to make a listview looks like this:
i set a list view to vsReport and wrote the following code:
Procedure Tform1.Button1click(Sender: Tobject);
var
  l:TListItem;
  r:TRect;
Begin
  l:=lv.Items.Add;
  l.Caption:='item '+IntToStr(lv.Items.Count);
  r:=l.DisplayRect(drBounds);
  r.Left:=r.Left+lv.Column[0].Width;
  r.Right:=r.Left+lv.Column[1].Width;
  lv.Canvas.Pen.Color:=clRed;
  lv.Canvas.Brush.Color:=clRed;
  lv.Canvas.Rectangle(r);
  lv.Canvas.FillRect(r);
End;  
but this method doesn't work at all! there is no red rectangle under the
column.
can anyone help me?

regards,
Yan Chengyuan

<<attachment: pic1.jpg>>

_______________________________________________
Lazarus mailing list
[email protected]
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to