ImageEn, unit iemview

TImageEnMView.OnImageIDRequestEx

TImageEnMView.OnImageIDRequestEx


Declaration

property OnImageIDRequestEx: TIEImageIDRequestExEvent;


Description

Occurs whenever an image is required if you have specified a value for the ImageID property.

ID is the value you have specified in ImageID property.
Bitmap is the image to display. It is a TIEBitmap (use OnImageIDRequest if you require a TBitmap). The bitmap is copied in TImageEnMView, and then automatically freed.

Note:
 You must have specified and ImageID of >=0 or the OnImageIDRequestEx event will not fire (the value of ImageID is not used by ImageEn, so any value is acceptable).
 The Bitmap you specify for OnImageIDRequestEx will be freed by the control, so ensure you pass a temporary object


Demo

Demo  Demos\Multi\Multi-OnDemand\MViewOnRequest.dpr
Demo  Demos\InputOutput\TiffHandler2\TiffHandler2.dpr


Example

procedure TMyForm.ImageEnMViewOnImageIDRequestEx(Sender: TObject; ID: integer; var Bitmap: TIEBitmap);
begin
  // Create the image dynamically
  Bitmap := TIEBitmap.create;
  GenerateChartOfID(ID, Bitmap);
end;


See Also

 OnImageIDRequest
 OnGetLoadFilename