Delphi-Quellcode:
procedure TForm1.DBGrid1DrawColumnCell(Sender: TObject; const Rect: TRect;
DataCol: Integer; Column: TColumn; State: TGridDrawState);
begin
if State=[gdSelected] then begin
DBGrid1.Canvas.Brush.Color:=clGray;
DBGrid1.Canvas.TextOut(Rect.Left, Rect.Top, Column.Title.Caption);
end else begin
DBGrid1.Canvas.Brush.Color:=clRed;
DBGrid1.Canvas.TextOut(Rect.Left, Rect.Top, Table1.Fields[DataCol].AsString);
end;
end;
z.B.
Probier mal ein bischen mit CANVAS rum.