ImageEn, unit imageenview

TIEDropFileEvent

TIEDropFileEvent

Declaration

TIEDropFileEvent = procedure(Sender: TObject; Filename: String; var AllowDrop: Boolean) of object;

Description

Used by OnDropFile whenever a file is dropped onto the control (when AllowDrop is true).

Filename is the file that has been dropped.
AllowDrop determines whether the image will be loaded or not

Example

procedure TMyForm.ImageEnView1DropFiles(Sender: TObject; Filename: String; var AllowDrop: Boolean);
begin
  // Custom handling for PDF files
  if Uppercase( ExtractFileExt( Filename )) = '.PDF' then
  begin
    AllowDrop := False;
    DisplayPDF( Filename );
  end;
end;