Hice esto, pero no me dibuja la imagen adentro de la celda, y no se por que me sale este error
Código Delphi
[-]
[Warning] Unit2.pas(824): Variable 'icono' might not have been initialized
El cual solucione, cambiando a FALSE el DefaultDrawing del DBGrid, pero aun asi no me dibuja la imagen dentro de la celada
Código Delphi
[-]
procedure TFormSubclases.DBGrid1DrawDataCell(Sender: TObject;
const Rect: TRect; Field: TField; State: TGridDrawState);
var icono: TBitmap;
begin
if Field.Name = 'Icono' then
begin
try
icono:= Tbitmap.Create;
icono.Assign(TBlobField(Field));
(Sender as TDBGrid).Canvas.FillRect(Rect);
(Sender as TDBGrid).Canvas.Draw(Rect.left+3,Rect.Top+1, icono);
finally
icono.free;
end;
end
else
(Sender as TDBGrid).DefaultDrawDataCell(Rect, Field, State);
end;
Saludos
__________________
Código Delphi
[-]
try
ProgramarMicro(80C52,'Intel',MnHex,True);
except
On Exception do
MicroChip.IsPresent(True);
end;