TCustomRichViewEdit.OnDropFile

<< Click to display table of contents >>

TCustomRichViewEdit.OnDropFile

Occurs when dropping files in the editor (as a result of drag&drop operation, for example from Windows Explorer), or when pasting data in this format.

type

  TRVDropFileEvent = procedure(Sender: TCustomRichViewEdit;
    const FileName: TRVUnicodeString; var DoDefault: Boolean)

    of object;

 

property OnDropFile: TRVDropFileEvent;

(introduced in version 17; changed in version 18)

This event occurs when accepting data in CF_HDROP format, when pasting from the Clipboard (see PasteGraphicFiles), or as a result of drag&drop.

In this event, you can insert content of this file in the caret position.

 

Input parameters:

FilesName a name of file to insert.

DoDefault = True.

 

Output parameters:

DoDefault set it to False if you have processed the file yourself in this event. If not, RichViewEdit will try to insert it as a graphic, RTF, RVF, plain text.