[Lazarus] How to draw a progress bar under a column of a listview?
YanChengyuan
yanchengyuan at gmail.com
Tue Apr 7 04:39:55 CEST 2009
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20090407/b90e9ed3/attachment-0004.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pic1.jpg
Type: image/jpeg
Size: 6205 bytes
Desc: not available
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20090407/b90e9ed3/attachment-0004.jpg>
More information about the Lazarus
mailing list