Drag and Drop

Scott Rossi scott at tactilemedia.com
Mon Feb 7 00:55:14 EST 2011


Pete:

There are several drag and drop references you can explore (for example, the
LiveCode User Guide found under Help > User Guide, page 262).  LC has all
the commands to implement what you want.

On a semi-related note, I have a drag and drop sample stack that is all
LiveCode script, based on work done by the late Eric Chatonet.  I wanted a
drag and drop routine that represented dragged objects using their original
forms, rather than a rectangle.  You can get the stack by executing the
following in your message box:
 go url "http://www.tactilemedia.com/site_files/downloads/TMdragndrop.rev"

Start dragging any object and the "drop stack" will open automatically.
Note that this doesn't use LC's drag and drop routines, and as such has a
couple of limitations, so learning the "real" drag and drop routines might
be better in the long run.  But the scripted solution works fine for me.  As
they say, YMMV.

Regards,

Scott Rossi
Creative Director
Tactile Media, UX Design




Recently, Peter Haworth wrote:

> Sounds perfect!  Now if I only knew how to do that.....
> Pete Haworth
> 
> On Feb 6, 2011, at 5:21 PM, DunbarX at aol.com wrote:
> 
>> If you know what controls are where, and you must because you made them,
>> named them and placed them on your palette, then can't you just get target
>> info, clone the control, and make it track the mouse until dropped?
>> 
>> 
>> Or am I missing everything?
>> 
>> 
>> Craig Newman
>> 
>> 
>> 
>> 
>> 
>> -----Original Message-----
>> From: Peter Haworth <pete at mollysrevenge.com>
>> To: How to use LiveCode <use-livecode at lists.runrev.com>
>> Sent: Sun, Feb 6, 2011 4:16 pm
>> Subject: Drag and Drop
>> 
>> 
>> I would like to set up the equivalent of the LC Tools palette so I can drag
>> and 
>> drop some custom controls from it to any card.
>> 
>> Mark - I read your excellent write up on Drag and Drop but it seems to be
>> aimed 
>> at a different situation than this (dragging info from one control to
>> another).  
>> I also used the message watcher to see what happens when I drag an LC control
>> from the LC tools palette to a card and I didn;t see any of the standard
>> drag/drop messages.
>> 
>> Any tips on how to set about doing this?
>> 
>> Pete Haworth
>> 






More information about the Use-livecode mailing list