Registriert seit: 29. Mai 2002
Ort: Frankfurt
8.252 Beiträge
Delphi 2006 Professional
|
Re: DBGRID Hintergrund einer Zelle ändern
15. Jul 2004, 13:38
Hai Berseker,
guckst Du:
Delphi-Quellcode:
procedure TForm1.DBGrid1DrawColumnCell(Sender: TObject; const Rect: TRect;
DataCol: Integer; Column: TColumn; State: TGridDrawState);
begin
if (Column.Field.FullName = 'ACTIVE') then
begin
if (Column.Field.AsInteger = 1) then
begin
DBGrid1.Canvas.Brush.Color := clYellow;
end;
end;
DBGrid1.DefaultDrawColumnCell(Rect, DataCol, Column, State)
end;
Zu langsam
Stephan B. "Lasst den Gänsen ihre Füßchen"
|