Delphi: Paint Rows of ListView -
i have listview (vsreport): last subitem has text "wait". change "ok" or "error". how paint whole row (if use sender.canvas.brush.color in customdrawitem gaps between columns in windows 7) subitem in green (ok) , red (error)?
thanks!
you can do
procedure tform1.listview1customdrawitem(sender: tcustomlistview; item: tlistitem; state: tcustomdrawstate; var defaultdraw: boolean); begin if item.index = sender.items.count - 1 begin sender.canvas.brush.color := clskyblue; sender.canvas.fillrect(item.displayrect(drbounds)); end; end; but advice against it, because buggy (and don't know how fix it).
screenshot http://privat.rejbrand.se/listviewentirerowfill.png
Comments
Post a Comment