Este es un código que tengo sobre un componente nuestro que deriva del StringGrid así que podrás interpretarlo fácilmente
Código Delphi
[-]
procedure TFormManejaVerifactu.NTStringGrid3DrawCell(Sender: TObject; ACol,
ARow: Integer; Rect: TRect; State: TGridDrawState);
var
SelectedPicture: TBitmap;
begin
if NtStringGrid3.RowCount <2 then
exit;
with Sender as TStringGrid do begin
if NtStringGrid3.ValorCeldaPorCampoYFila('RESULTADO',ARow)<>'' then begin
if (ACol=0) then begin
if NtStringGrid3.Cells[0,ARow]<>'' then begin
SelectedPicture:=TBitmap.Create;
If NtStringGrid3.Cells[0,ARow]='0' then begin
ImageList.GetBitmap(0, SelectedPicture);
end else if NtStringGrid3.Cells[0,ARow]='1' then begin
ImageList.GetBitmap(1, SelectedPicture);
end else if NtStringGrid3.Cells[0,ARow]='2' then begin
ImageList.GetBitmap(2, SelectedPicture);
end;
NtStringGrid3.Canvas.Draw(Rect.Left-2, Rect.Top, SelectedPicture);
SelectedPicture.Free;
end;
end;
end;
end;
end;
Saludos.