Recent

Author Topic: Drag and drop on OS-X  (Read 7555 times)

qdos

  • Full Member
  • ***
  • Posts: 112
Drag and drop on OS-X
« on: February 23, 2011, 12:23:42 am »
I have a normal Lazarus application, and I would like to support dropping of files on the main form.
I found the event for this, but it doesnt fire when i drop files onto the main form (yes i did set the property AllowDropFiles).
What am I doing wrong?

1. Start a new Lazarus project, save project to disk
2. Set AllowFropFiles:=True in the inspector
3. Handle the OnDropFiles event. Just show a messagebox... showmessage('Files dropped!');

Nothing. No response at all when i drop files or folders on the form. Now from what I understand there are 3 scenarios:

  • 1. A user double-clicks on a file associated with your app
  • 2. A user drops a file onto the program icon in the doc
  • 3. A user drops a file/files/folder onto the main-form of an application

Number 1 & 2 is not really required (but would be nice to support). I also found a previous post that deals explicitly with these two operation.

Does anyone know to to get the third scenario working?
« Last Edit: February 23, 2011, 12:27:32 am by qdos »

Phil

  • Hero Member
  • *****
  • Posts: 2737
Re: Drag and drop on OS-X
« Reply #1 on: February 23, 2011, 03:32:18 am »

 

TinyPortal © 2005-2018