It took some effort :-) I'm in an unusual position because the selection of objects in Navigator's live display *really* messes with the traditional drag/drop messages and the selection within the field I use for the list display. I tried very hard to work around that many years back, but finally gave up, and used a set of drag and drop code that just depended on mouseDown, mouseMove, mouseUp, and mouseRelease. I think it was from Scott Rossi originally, but I'm not sure.
The new code builds on that, and uses two stacks with their blendlevel set to something like 80: one to represent the dragged objects, one to highlight the targets. Despite the mouse leaving the list and being over the drag stack, the mouseMove messages still go to the list field. So I dispatch a message from there to the drag stack, to keep things clean in the list field. There's a lot of translation from local to screen coordinates. All of the code is available in Navigator, or at the Navigator GitHub repository <https://github.com/gcanyon/navigator>. It's not particularly clean at present because I built it all wrong the first time, and then re-built it. When I go back in I'll cut away the vestigial code. There is still a ton to do: 1. Dragging from stacks into Navigator. 2. Dragging from Navigator into another Navigator. 3. Alignment to existing controls in stacks I drag into -- this is why I started the project in the first place. If you have any questions, let me know. gc On Mon, Feb 12, 2018 at 7:50 AM, Bob Sneidar via use-livecode < email@example.com> wrote: > Sure like to know how you do that. I've tried but cannot get it to work. > I'd like to make a smartObjects panel so I could store and clone common > objects with scripts, properties and backscripts already intact, but I > never was able to get the drag/drop functionality working. > > Bob S > > > > On Feb 12, 2018, at 01:52 , Geoff Canyon via use-livecode < > firstname.lastname@example.org> wrote: > > > > Drag and drop has always been just within a single Navigator window -- > not > > between Navigator windows, and not to/from open stacks. That changes (a > > bit) today! You can now select any set of controls in a Navigator window > > and drag them out of that window and onto any open stack. Detailed > > documentation will come tomorrow, but there are notes below. > > > _______________________________________________ > use-livecode mailing list > email@example.com > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode > _______________________________________________ use-livecode mailing list firstname.lastname@example.org Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode