Ver Mensaje Individual
  #2  
Antiguo 16-12-2004
Avatar de Héctor Randolph
[Héctor Randolph] Héctor Randolph is offline
Miembro Premium
 
Registrado: dic 2004
Posts: 882
Reputación: 20
Héctor Randolph Va por buen camino
Hola Aprendiz!

Mi sugerencia es la siguiente:

Si el problema es que solamente existe un DBImage, entonces deberías utilizar el Canvas del DBCtrlGrid para dibujar tu imágen directamente sobre él y te olvidas del DBImage.

Es decir:

Código Delphi [-]
procedure TForm1.DBCtrlGrid1PaintPanel(DBCtrlGrid: TDBCtrlGrid;
  Index: Integer);
var
  Stream:TMemoryStream;
  Bitmap: TBitmap;
begin
  Stream:=TMemoryStream.Create;
  Bitmap:=TBitmap.Create;
  TBlobField(DBCtrlGrid.DataSource.DataSet.FieldByName('GRAPHIC')).SaveToStream(Stream);
  Bitmap.LoadFromStream(Stream);
  Bitmap.Transparent:=True;
  Bitmap.TransparentColor:=8421376;
  DBCtrlGrid.Canvas.Draw(4,4,Bitmap);
  Bitmap.Free;
  Stream.Free;
end;

Espero que te sea útil.

Un saludo
Responder Con Cita