ImageEn, unit iemview

TImageEnMView.SetExternalMBitmap

TImageEnMView.SetExternalMBitmap


Declaration

procedure SetExternalMBitmap(value : TIECustomMultiBitmap);


Description

Allows a custom TIEMultiBitmap or TIEDBMultiBitmap object to be attached to the TImageEnMView. The TImageEnMView will automatically display changes to the attached Multi-Bitmap.

It is mainly used to make a TImageEnMView DB aware.

Note:
 You must create and destroy the external multi-bitmap yourself
 Use SetExternalMBitmap( nil ) to reset usage to the internal TIEMultiBitmap


Example

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

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

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