Sign in Join
Wiki copytemporary

Drop files event

The drop files event will be invoked when the user drops one or multiple dragged files on one of application's forms.

First this event should be fired for target form (or main form if drop target is unknown), then for the application.

Possible implementation for LCL

pascal
TDropFilesEvent = procedure (Sender: TObject; const FileNames: Array of String) of Object;

Add OnDropFiles: TDropFilesEvent to TCustomForm, TApplication and TApplicationProperties. Each form will have property AllowDropFiles: Boolean, which enables this event.

Possible implementation per widgetsets

The widgetsets should call method IntfDropFiles of target form (or main form if drop target is unknown) and the application.

Win32/64

GTK1/2

Qt

Carbon

Related bug reports

TODO

  1. implement for Qt already implemented (during 0.9.27)

From the Free Pascal wiki, page "Drop files event", as it stood on 2017-04-05 after a change by Bart, out of the wiki's dump of 2024-05-26. Copyright stays with the author who wrote it, according to the old wiki's Licensing page. If you have concerns about this material, message the admin.

Revision 3, last changed by WikiArchive .

Talk about this page

Nobody has opened a bench for this page yet. Sign in to open one.