How to accept a drag&drop item?

Gajo Csaba gcsaba2 at freemail.hu
Thu Aug 25 19:18:07 EDT 2005



Brian Yennie <briany at qldlearning.com> wrote:

> Csaba,
> 
> Well, you can do it with two lines of code, or none =).
> 
> If you use an unlocked text field, it just works by 
default. I drag a 
> link from FireFox to an editable field, and the URL 
appears.

WOW, I didn't know that! That's amaizing!
It does work from FireFox, unfortunately it won't work when dragged 
from Opera.. oh well...


> If you have a different kind of object receiving the drag, 
you can do 
> something like this:
> 
> on dragEnter
>    set the acceptDrop to TRUE
> end dragEnter
> 
> on dragDrop
>    put the dragData["text"] into fld "myURL"
> end dragDrop
> 
> If you look in the docs under "dragDrop" and all of the 
related terms, 
> it should spell things out quite nicely.
> 
> - Brian

Thanks alot :)
Csaba

_______________________________________________________________________
[freemail] extra 1GB-os postafiókkal, Önnek már van? http://freemail.hu





More information about the use-livecode mailing list