guden schaut euch mal die prucedure an...
Quelltext
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18:
| procedure TForm1.ColorGrid(dbgIn: TDBGrid; Table1: TTable; const Rect: TRect; DataCol: Integer; Column: TColumn; State: TGridDrawState); var iValue: LongInt; begin if (DataCol > 0) then begin iValue := Table1.FieldByName('Firma').AsInteger; case iValue of 1: dbgIn.Canvas.Brush.Color := clAqua; 2: dbgIn.Canvas.Brush.Color := clLime; 3: dbgIn.Canvas.Brush.Color := clYellow; 4: dbgIn.Canvas.Brush.Color := clRed; end; dbgIn.DefaultDrawColumnCell(Rect, DataCol, Column, State); end; end; |
ich bekomm bei iVelue eine "ungülige zeigerOperation"???
ich übergebe die daten so
Quelltext
1:
| ColorGrid(DBGrid1, Table1, Rect, DataCol, Column, State); |
was iss da falsch ??
