[Lazarus] Is it possible to drag and drop a web browser URL into a Lazarus app?

Graeme Geldenhuys graemeg.lists at gmail.com
Thu Mar 22 09:08:01 CET 2012


On 20 March 2012 16:37, Frank Church <vfclists at ...> wrote:
> Is it possible to drag and drop a web browser URL into a Lazarus app?
>
> Are there some controls with that facility?


In fpGUI is is handled just like any other DND action. Simply register
what mime-type the drop target must look out for. It will then happile
accept a drop action if such a mime-type is supplied. Simple and easy
to use, and works on all platforms.

Lazarus's drag-n-drop is based on the very limited Delphi / Windows
DND, so is mainly build for in-app drag-n-drop, and not able to accept
external drag-n-drop actions. Normally (in Delphi) you would have to
revert to Windows API calls to get better DND support. I remember
seeing them (the Lazarus team) extending the default limited DND a bit
to support dropping files on a LCL app, but that is a far cry from
complete DND support.


Out of interest, I ran the DND Demo of fpGUI, which shows what
mime-types the source of a DND action is willing to supply. I dragged
the URL from the Chrome web browser and dropped in onto the Text Edit
field. Below that is the complete list of mime-types (8 in total) that
Chrome was willing to supply the data in. I don't know if this
information will help you with your LCL application in any way.


-- 
Regards,
  - Graeme -


_______________________________________________
fpGUI - a cross-platform Free Pascal GUI toolkit
http://fpgui.sourceforge.net
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Screenshot-Drop Site Demo.png
Type: image/png
Size: 10035 bytes
Desc: not available
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20120322/7ac07eec/attachment-0003.png>


More information about the Lazarus mailing list