procedure Tinfo.DBGrid1DrawColumnCell(Sender: TObject; const Rect: TRect;
DataCol: Integer; Column: TColumn; State: TGridDrawState);
begin
if query1.FieldByName(’all’).asstring>40’ then
begin
dbgrid1.Canvas.Font.Color:=clred;
dbgrid1.Canvas.Brush.color:=clyellow;
end
else
begin
dbgrid1.Canvas.Font.Color:=clblue;
dbgrid1.Canvas.Brush.color:=clyellow;
end;
dbgrid1.DefaultDrawColumnCell(rect,datacol,column,state);
end;
DataCol: Integer; Column: TColumn; State: TGridDrawState);
begin
if query1.FieldByName(’all’).asstring>40’ then
begin
dbgrid1.Canvas.Font.Color:=clred;
dbgrid1.Canvas.Brush.color:=clyellow;
end
else
begin
dbgrid1.Canvas.Font.Color:=clblue;
dbgrid1.Canvas.Brush.color:=clyellow;
end;
dbgrid1.DefaultDrawColumnCell(rect,datacol,column,state);
end;
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货