Lazarus

Programming => LCL => Topic started by: zxmwc24 on May 13, 2020, 07:18:15 pm

Title: Drag & Drop: OnDropFiles not fired
Post by: zxmwc24 on May 13, 2020, 07:18:15 pm
I try to use the standard Lazarus way to implement file drag & drop on Win32, according to the Wiki sample https://wiki.freepascal.org/Drag_and_Drop_sample (https://wiki.freepascal.org/Drag_and_Drop_sample). When I start a new project and just set the Form's AllowDropFiles property to true and add some ShowMessage('Hello') into the OnDropFiles event, nothing happens when dragging a file onto the form from the Explorer. So apparently the event is not being fired.
I read that there used to be a bug but should be fixed by now.
Any idea?  :-\
Title: Re: Drag & Drop: OnDropFiles not fired
Post by: lucamar on May 13, 2020, 08:24:15 pm
Please, specify what your OS type and version are as well as your Lazarus/FPC version and widgetset.

In the meantime, test with this minimal project (attached) and tell us whether it works or fails and , if the latter, how it fails.

I have tested it in Linux i386 and Windows XP and it worked as it should.
Title: Re: Drag & Drop: OnDropFiles not fired
Post by: Bart on May 13, 2020, 10:34:42 pm
You did actually set the OnDropFiles to an event in the ObjectInspector?

Bart
TinyPortal © 2005-2018