Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: drag and drop


This question is not answered. Helpful answers available: 2. Correct answers available: 1.


Permlink Replies: 4 - Last Post: May 15, 2017 2:27 PM Last Post By: Robert Kondner
Manlio Laschena

Posts: 11
Registered: 11/17/99
drag and drop  
Click to report abuse...   Click to reply to this thread Reply
  Posted: May 14, 2017 12:59 AM
Drag and Drop does not work anymore on code editor. Do you know if CNPack may influence ? Thanks
Fred Schetterer

Posts: 83
Registered: 5/20/99
Re: drag and drop  
Click to report abuse...   Click to reply to this thread Reply
  Posted: May 15, 2017 8:22 AM   in response to: Manlio Laschena in response to: Manlio Laschena
Manlio Laschena wrote:
Drag and Drop does not work anymore on code editor. Do you know if CNPack may influence ? Thanks

Are you running the IDE elevated? If so that can stop it from working.
Robert Kondner

Posts: 59
Registered: 11/15/01
Re: drag and drop  
Click to report abuse...   Click to reply to this thread Reply
  Posted: May 15, 2017 1:33 PM   in response to: Manlio Laschena in response to: Manlio Laschena
Manlio Laschena wrote:
Drag and Drop does not work anymore on code editor. Do you know if CNPack may influence ? Thanks

As a side question:

I have been using the Drag Drop tools from Anders Melander but that has been in-active for 7 years or so. I have tweaked that a few times and a Sven Harazim has been maintaining things. I still use it in 10.1 but I worry about the future.

There are a host of different formats 'CF_TEXT', 'CF_BITMAP', 'CF_METAFILEPICT', 'CF_SYLK', 'CF_DIF', 'CF_TIFF',
'CF_OEMTEXT', 'CF_DIB', 'CF_PALETTE', 'CF_PENDATA', 'CF_RIFF', 'CF_WAVE',
'CF_UNICODETEXT', 'CF_ENHMETAFILE', 'CF_HDROP', 'CF_LOCALE','CF_DIBV5'); and more.

Do "Built In" Delphi components handle all these?

Anyone know what standard Delphi components support or where Drag Drop is further documented?

Thanks,
Bob K.
Remy Lebeau (Te...


Posts: 9,447
Registered: 12/23/01
Re: drag and drop  
Click to report abuse...   Click to reply to this thread Reply
  Posted: May 15, 2017 2:17 PM   in response to: Robert Kondner in response to: Robert Kondner
Robert wrote:

I have been using the Drag Drop tools from Anders Melander but that
has been in-active for 7 years or so.

Microsoft's OLE Drag&Drop API (the IDropSource, IDropTarget, and IDataObject
interfaces) hasn't really changed over the years, so there is not a whole
lot that needs to change in Anders' code.

There are a host of different formats
<snip>
Do "Built In" Delphi components handle all these?

In VCL, OLE Drag&Drop is not natively implemented at all. It has to be
implemented manually in user code (hence why Anders wrote his drag&drop components
in the first place), but then you can support whatever formats you want,
if you are willing to put in the work.

In FMX, OLE Drag&Drop is natively implemented on Windows, but with caveats:

1. when dragging data over and dropping it onto a Form, the Form's OnDragEnter,
OnDragOver, and OnDragDrop events will be triggered accordingly, however
the implementation only recognizes 3 formats - CF_HDROP, CF_UNICODETEXT,
and CF_FMOBJECT - so the event's Data parameter will be nil for any other
format. And there is no option (that I can see) to hook into the implementation
to provide custom processing of additional formats.

2. when dragging data from a Form, the implementation natively supports only
the CF_UNICODETEXT, CF_BITMAP, and CF_FMOBJECT formats, and there is no option
(that I can see) to hook into the implementation to provide custom data formats.

--
Remy Lebeau (TeamB)
Robert Kondner

Posts: 59
Registered: 11/15/01
Re: drag and drop  
Click to report abuse...   Click to reply to this thread Reply
  Posted: May 15, 2017 2:27 PM   in response to: Remy Lebeau (Te... in response to: Remy Lebeau (Te...
Remy Lebeau (TeamB) wrote:
Robert wrote:

I have been using the Drag Drop tools from Anders Melander but that
has been in-active for 7 years or so.

Microsoft's OLE Drag&Drop API (the IDropSource, IDropTarget, and IDataObject
interfaces) hasn't really changed over the years, so there is not a whole
lot that needs to change in Anders' code.

There are a host of different formats
<snip>
Do "Built In" Delphi components handle all these?

In VCL, OLE Drag&Drop is not natively implemented at all. It has to be
implemented manually in user code (hence why Anders wrote his drag&drop components
in the first place), but then you can support whatever formats you want,
if you are willing to put in the work.

In FMX, OLE Drag&Drop is natively implemented on Windows, but with caveats:

1. when dragging data over and dropping it onto a Form, the Form's OnDragEnter,
OnDragOver, and OnDragDrop events will be triggered accordingly, however
the implementation only recognizes 3 formats - CF_HDROP, CF_UNICODETEXT,
and CF_FMOBJECT - so the event's Data parameter will be nil for any other
format. And there is no option (that I can see) to hook into the implementation
to provide custom processing of additional formats.

2. when dragging data from a Form, the implementation natively supports only
the CF_UNICODETEXT, CF_BITMAP, and CF_FMOBJECT formats, and there is no option
(that I can see) to hook into the implementation to provide custom data formats.

--
Remy Lebeau (TeamB)

Remy,

Ok, thanks. That explains things.

So it sounds like Anders tool is still an important tool as to seems to save me from the "Put In Work" for other formats.

I am glad to hear the area has not changed much, I just hope the code keeps on compiling! It just hope someone can keep Anders code and keep it under their wing. It is a great tool.

Thanks,
Bob K.
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02