ImageEn, unit iemview

TImageEnMView.OnImageIDRequest

TImageEnMView.OnImageIDRequest


Declaration


property OnImageIDRequest: TIEImageIDRequestEvent;


Description


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

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


Example


procedure TMyForm.ImageEnMViewOnImageIDRequest(Sender: TObject; ID: integer; var Bitmap: TBitmap);
begin
  // Retrieve the image from a TImageList
  Bitmap := TBitmap.create;
  ImageList1.GetBitmap(ID, Bitmap);
end;