改变listview颜色
作者:lnjamn
关键字:
时间:2005-12-30 4:28:20
<http://www.delphibbs.com/delphibbs/dispq.asp?lid=3274901>
procedure TQueryForm.ListViewCustomDrawItem(Sender: TCustomListView;
Item: TListItem; State: TCustomDrawState; var DefaultDraw: Boolean);
begin
inherited;
DefaultDraw:=false;
{ if cdshot in state then
begin
ListView.Canvas.Font.Color:=clred;
ListView.Canvas.Brush.Color:=clblue;
end; }
if StrtoFloat(Item.SubItems[4]) < 60 then
begin
ListView.Canvas.Brush.Color := RGB(255, 240, 210);
ListView.Canvas.Font.Color := clBlack;
end;
DefaultDraw:=true;
end;
|