procedure TForm1.DBGridDrawDataCell(Sender: TObject; const Rect: TRect;
Field: TField; State: TGridDrawState);
begin
if Field is TBooleanField then begin
DBGrid.Canvas.FillRect(Rect);
if TBooleanField(Field).AsBoolean then
DBGrid.Canvas.BrushCopy(Classes.Rect((Rect.Left + Rect.Right - FBMTrue.Width) div 2,
(Rect.Top + Rect.Bottom - FBMTrue.Height) div 2,
(Rect.Left + Rect.Right + FBMTrue.Width) div 2,
(Rect.Top + Rect.Bottom + FBMTrue.Height) div 2),
FBMTrue, Classes.Rect(0, 0, FBMTrue.Width, FBMTrue.Height),
FBMTrue.TransparentColor)
else
DBGrid.Canvas.BrushCopy(Classes.Rect((Rect.Left + Rect.Right - FBMFalse.Width) div 2,
(Rect.Top + Rect.Bottom - FBMFalse.Height) div 2,
(Rect.Left + Rect.Right + FBMFalse.Width) div 2,
(Rect.Top + Rect.Bottom + FBMFalse.Height) div 2),
FBMFalse, Classes.Rect(0, 0, FBMFalse.Width, FBMFalse.Height),
FBMFalse.TransparentColor)
end;
end;