[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] | Reference for unit 'Forms' (#lcl)

# TCustomForm.OnDropFiles

Handler called when files have been dropped.

## Declaration

Source position: forms.pp line 804

`public property TCustomForm.OnDropFiles : TDropFilesEvent read FOnDropFiles write FOnDropFiles;`

## Description

OnDropFiles is a TDropFilesEvent event handler signalled when a File Drag notification is received from the LCL / widgetset interface.

The Sender argument contains the current form instance. The FileName argument contains an array with the fully-qualified file names for the drop operation.

Set AllowDropFiles to True to enable drag and drop operations, and execution of this event handler. The event handler is not signalled when AllowDropFiles is set to False.

The event handler should perform any actions needed for each of the files dropped onto the form instance.

## See also

TCustomForm.AllowDropFiles |  | Specifies whether files can be dropped onto this form.
TDropFilesEvent |  | Type used for an OnDropFiles event handler.