Keith, Sorry but I do not really have code that will help you. My code works with either a selection listbox as source (creates a set), or expects a file/folder from the OS
However, roughly what you need to do: Note: my memory of this is foggy…and I am guessing a bit here Since you are using an array listbox as source, as I recall you need to us the on Begin Drag over event to capture the row(s) being dragged and place them on the pasteboard. Using: APPEND DATA TO PASTEBOARD <https://docs.4d.com/4Dv18/4D/18/APPEND-DATA-TO-PASTEBOARD.301-4505401.en.html> NOTE: As I recall you can create your own data type and then catch it on the drop side On the drop side Using: GET PASTEBOARD DATA TYPE <https://docs.4d.com/4Dv18/4D/18/GET-PASTEBOARD-DATA-TYPE.301-4505393.en.html> You can determine the type of the data on the pasteboard and then using GET PASTEBOARD DATA <https://docs.4d.com/4Dv18/4D/18/GET-PASTEBOARD-DATA.301-4505396.en.html> You can retrieve the data, and process it. Depending on how you are handling the retrieving of the data on the drop side. You might also need to use: Pasteboard data size <https://docs.4d.com/4Dv18/4D/18/Pasteboard-data-size.301-4505395.en.html> I’m sorry but it has been a while since I wrote that code, and I cannot find the source at the moment. But as I recall this is basically what I did except with a set (since I was working with a section listbox as source). I hope this helps! Chip > On Sep 13, 2020, at 6:35 PM, Keith Goebel via 4D_Tech <[email protected]> > wrote: > > Jeremy: >> Yes, there is a much easier way to handle Drag and Drop > > So, if I am understanding you correctly, we need to replace the command with: > - create an object during On Begin Drag Over (source object) > - store the source listbox variable (pointer/name?) and its current > element in the object (will test if dragged element is known at this point) > - store the stringified object onto text pasteboard > - trap On Drop event for target listbox and extract source info from text > pasteboard > - load JSON object back from text pasteboard > - extract source listbox (pointer/name?) and dragged element from object > - continue process as usual > > Many thanks for pointing out the steps needed. > Seems we will all have to do a lot of recoding to replace a single very > simple command that is no longer available. I guess we’ll never know why 4D > did that. > > Chip: > Thanks for your offer of example code. > Yes please… :-) ********************************************************************** 4D Internet Users Group (4D iNUG) New Forum: https://discuss.4D.com Archive: http://lists.4d.com/archives.html Options: https://lists.4d.com/mailman/options/4d_tech Unsub: mailto:[email protected] **********************************************************************

