[SOLVED] Allow drag and drop from external applications? lazarus / 31-LCL ---------------------------------------------------------------------- BigChimp · 2014-09-09 11:05 In the past, this question has been asked with a negative reply. Perhaps things have changed meanwhile I have an application with a TEdit. From another application, e.g. Notepad++, I can select text and drag that to the TEdit control on my application and try to drop it. This doesn't work by default (not surprisingly). Is there a way to get the text pasted into the control on drop? If there is only a Windows-specific solution, that's fine, too. ---------------------------------------------------------------------- wp · 2014-09-09 11:46 http://lazplanet.blogspot.de/2013/05/drag-drop-files-lazarus-form.html ---------------------------------------------------------------------- BigChimp · 2014-09-09 11:48 Yes, but I'm not talking about files but text... so that example doesn't apply. ---------------------------------------------------------------------- rvk · 2014-09-09 12:56 Maybe you could use something like this: http://delphidabbler.com/articles?article=24 ---------------------------------------------------------------------- BigChimp · 2014-09-09 12:58 Thanks, that looks promising. Will get back with success report or... further questions ---------------------------------------------------------------------- rvk · 2014-09-09 13:00 Looking for "IDataObject lazarus" i also found this: https://github.com/alrieckert/lazarus/tree/master/components/jcf2/Util s/DragDrop Maybe it's already in better shape for FPC/Lazarus. Good luck ---------------------------------------------------------------------- BigChimp · 2014-09-09 13:33 Mmm... that gave me an idea... found this path in Lazarus $(lazarusdir)\components\jcf2\Utils\DragDrop ---------------------------------------------------------------------- rvk · 2014-09-09 13:59 It should look something like attached project1. (Just a new project with one TMemo dropped on the form receiving text) It doesn't work with all text-editors (like UEdit) but it worked with pasting text from LibreOffice. (It does also work with Notepad++) ---------------------------------------------------------------------- BigChimp · 2014-09-09 16:17 Thanks a lot - that works nicely Committed functionality to my Dutch postcode program: (You can drag an address to the https://bitbucket.org/reiniero/postcode Started updating http://wiki.lazarus.freepascal.org/Drag_and_Drop_sample