Dragging from a list field

Eric Chatonet eric.chatonet at sosmartsoftware.com
Sun Aug 28 04:08:25 EDT 2005


Hi Jacque,

Sorry, I'm coming a bit late...
I have done such a thing in a project where the user can drag and  
drop images, movies, sounds and texts from a palette that displays  
their images in order to build a multimedia document. So between two  
stacks.
I had a specific stack for this purpose displaying an image created  
on-the-fly by taking a snapshot.
This tiny stack was shown at mouseDown, covering exactly the actual  
image in the palette and then the user could drag it where he/she  
wanted.
A pending message told me where the mouseUp occurred and I acted  
accordingly.
I used this method since I wanted the stack to move smoothly to its  
starting position if it was not in a "right" place and this feature  
made the job much more tricky :-)
As far as I remember, a lot of code, some focus and cross-platform  
issues and so on, but a fine result :-)

Best Regards from Paris,

Eric Chatonet.

PS. If you are interested in more details, write me off list.

Le 27 août 05 à 18:42, J. Landman Gay a écrit :

> I have a list field that operates like an index; clicking on a line  
> causes the stack to display content based on the text of the line.
>
> I also need the field to support drag and drop, so that users can  
> create their own lists by dragging lines from the index into a  
> different field in a substack.
>
> I tried setting the dragData on a mousedown in the index field, but  
> even if I pass mouseDown, the index behaviors no longer function.  
> The field does not recognize "mouseup" or "selectionchanged" and  
> nothing happens. Actually, when I try dragging a line, the  
> selection changes to whatever line the pointer is over. Does anyone  
> have a trick for making a list field behave in two different ways  
> -- that is, normal line selection as well as supporting dragging  
> lines to another field?

----------------------------------------------------------------
So Smart Software

For institutions, companies and associations
Built-to-order applications: management, multimedia, internet, etc.
Windows, Mac OS and Linux... With the French touch

Free plugins and tutorials on my website
----------------------------------------------------------------
Web site        http://www.sosmartsoftware.com/
Email        eric.chatonet at sosmartsoftware.com/
Phone        33 (0)1 43 31 77 62
Mobile        33 (0)6 20 74 50 86
----------------------------------------------------------------




More information about the use-livecode mailing list