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.
Note:
◼You must have specified and
ImageID of >=0 or the OnImageIDRequest event will not fire (the value of ImageID is not used by ImageEn, so any value is acceptable).
◼The Bitmap you specify for
OnImageIDRequest will be freed by the control, so ensure you pass a temporary object
| Demos\Multi\Multi-OnDemand\MViewOnRequest.dpr |
| Demos\InputOutput\TiffHandler2\TiffHandler2.dpr |
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;
See Also
◼OnImageIDRequestEx◼OnGetLoadFilename