<< Click to display table of contents >>


Occurs when dropping files in the editor (as a result of drag&drop operation, for example from Windows Explorer)


  TRVDropFilesEvent =

    procedure (Sender: TCustomRichViewEdit;

      Files: TStrings; var FileAction: TRVDropFileAction;

      var DoDefault: Boolean) of object;

  TRVDropFileAction = (rvdfNone, rvdfInsert, rvdfLink);


property OnDropFiles: TRVDropFilesEvent;

(introduced in v1.8)

rvddFiles must be included in AcceptDragDropFormats property, otherwise the editor will not accept files.


Input parameters:

Files list of names of dropped files.

FileAction = rvdfNone.

DoDefault = True.


Output parameters:

FileAction operation that you have performed with these files:

rvdfNone nothing,

rvdfInsert the files were inserted,

rvdfLink hyperlinks to the files were inserted.

FileAction is ignored if DoDefault is set to True.

DoDefault set it to False if you have processed the files yourself in this event.

If the default processing is not canceled, the editor will process files one by one. For each file, it calls OnDropFile event, then (if the file was not processed in this event), it tries to insert this file as a graphic file, *.RTF, *.RVF, *.TXT.


See the example (how to insert files of all formats supported by Microsoft Office text import converters).


See also: