Recent

Author Topic: Drag & Drop: OnDropFiles not fired  (Read 359 times)

zxmwc24

  • Newbie
  • Posts: 1
Drag & Drop: OnDropFiles not fired
« 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. 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?  :-\

lucamar

  • Hero Member
  • *****
  • Posts: 3030
Re: Drag & Drop: OnDropFiles not fired
« Reply #1 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.
« Last Edit: May 13, 2020, 08:33:16 pm by lucamar »
Turbo Pascal 3 CP/M - Amstrad PCW 8256 (512 KB !!!) :P
Lazarus 2.0.8/FPC 3.0.4 - 32/64 bits on:
(K|L|X)Ubuntu 12..18, Windows XP, 7, 10 and various DOSes.

Bart

  • Hero Member
  • *****
  • Posts: 3919
    • Bart en Mariska's Webstek
Re: Drag & Drop: OnDropFiles not fired
« Reply #2 on: May 13, 2020, 10:34:42 pm »
You did actually set the OnDropFiles to an event in the ObjectInspector?

Bart

 

TinyPortal © 2005-2018