Was hast du in den letzten 24 Stunden unternommen, um selbst an die Lösung zu gelangen?
Delphi-Quellcode:
procedure TMainForm.DBGridDrawColumnCell(Sender: TObject;
const Rect: TRect; DataCol: Integer; Column: TColumn;
State: TGridDrawState);
var
f: TField;
begin
f :=
Query.FieldByName('
GENEHMIGT');
with Sender
as TDBGrid
do begin
if f.IsNull
then
Canvas.Brush.Color := clWhite
else if f.AsBoolean
then
Canvas.Brush.Color := clGreen
else
Canvas.Brush.Color := clRed;
DefaultDrawColumnCell(Rect, DataCol, Column, State);
end;
end;
Grüße vom marabu