ImageEn, unit iexDBBitmaps

TIEDBMultiBitmap.Create

TIEDBMultiBitmap.Create


Declaration

constructor Create(); overload;
constructor Create(aDataSource: TDataSource; const sImageBlobField, sFilenameField: string; Mode: TIEDBMultiMode); overload;
constructor Create(aDataSource: TDataSource; const sImageBlobField, sFilenameField: string; bFilenameFieldIsUnique: Boolean = False); overload;


Description

Create a new TIEDBMultiBitmap object.
Overloads create the bitmap and set DataSource, ImageBlobField, FilenameField and Mode or FilenameFieldIsUnique.


Examples

// Create DB Aware TImageEnMView
procedure TMainForm.FormCreate(Sender: TObject);
begin
  ... Open a database table ...

  fDBMBitmap := TIEDBMultiBitmap.create( DataSource1, 'Image', 'Name' );
  ImageEnMView1.SetExternalMBitmap( fDBMBitmap );
end;

procedure TMainForm.FormDestroy(Sender: TObject);
begin
  FreeAndNil( fDBMBitmap );
end;


// Use TIEDBMultiBitmap to show the image (which may have multiple frames) at the current database position
fDBMBitmap := TIEDBMultiBitmap.create( DataSource1, 'Image', 'Name', dmRecordFrames );
ImageEnMView1.SetExternalMBitmap( fDBMBitmap );