忘了贴代码了。
procedure Tfrmtz.DBGrid1DrawDataCell(Sender: TObject; const Rect: TRect;
Field: TField; State: TGridDrawState);
begin
If (State = [gdSelected]) or (State=[gdSelected,gdFocused]) then
begin
dbgrid1.Canvas.brush.color:=clinfobk;
dbgrid1.Canvas.Font.color:=clblack;
dbgrid1.Canvas.FillRect(rect);
dbgrid1.Canvas.TextOut(rect.left+4,rect.top+4,field.asstring);
end;
end;