Te pongo un ejemplo usando un DBGrid normal. Este es el evento OnDrawColumnCell del DBGrid:
Código Delphi
[-]
procedure TForm1.DBGrid1DrawColumnCell(
Sender: TObject; const Rect: TRect; DataCol: Integer;
Column: TColumn; State: TGridDrawState);
var
Bmp: TBitmap;
L, T: Integer;
begin
if DataCol = 4 then
begin
if Table1.FieldByName('campo').AsBoolean then
Bmp := BitmapSi
else
Bmp := BitmapNo;
L := Rect.Left + (Rect.Right - Rect.Left - Bmp.Width) div 2;
T := Rect.Top + (Rect.Bottom - Rect.Top - Bmp.Height) div 2;
DBGrid1.Canvas.Draw(L, T, Bmp);
end
else
DBGrid1.DefaultDrawColumnCell(Rect, DataCol, Column, State);
end;
Aquí, BitmapSi y BitmapNo serían dos TBitmap creados al inicio con las imágenes que quieras:
Código Delphi
[-]
procedure TForm1.FormCreate(Sender: TObject);
begin
BitmapSi := TBitmap.Create;
BitmapSi.LoadFromFile('SI.bmp');
BitmapNo := TBitmap.Create;
BitmapNo.LoadFromFile('NO.bmp');
end;
y destruidos al final
Código Delphi
[-]
procedure TForm1.FormDestroy(Sender: TObject);
begin
BitmapSi.Free;
BitmapNo.Free;
end;
// Saludos