Drag and Drop in List Field

Eric Chatonet eric.chatonet at sosmartsoftware.com
Thu May 26 10:36:06 EDT 2005


Hi Levi,

Some clues:

on dragEnter
   set the acceptDrop to <condition>
end dragEnter

on dragDrop
   put word 2 of the mouseLine into tLineNo
end dragDrop

You might be interested too by my How-To stack #010 How to drag and  
drop files and folders
Just run in the message box:
go url "http://www.sosmartsoftware.com/downloads/Managing%20Drag%20and 
%20Drop.rev"

Hope this helps.

Best regards from Paris,

Eric Chatonet.

Le 26 mai 05 à 16:22, Levi Kendall a écrit :

> Hello All,
>
>   I'm having some issues detecting a drag and drop operation in a
> field.  The field is configured to be a list (listBehavior attribute
> is set true).  I would also prefer to have multiple lines selectable
> (multipleHilites attribute).  I thought at first multi line selection
> was preventing the drag and drop operation, but it doesn't work with
> either setting.
>
>   The code I've used in the field's script is purely for detection
> purposes.  The first one I tried doesn't ever execute so I'm assuming
> the engine is not passing this message to the field ever.
>
> on dragStart
>   answer "Dragging Started"
> end dragStart
>
>   When this didn't work I figured I'd move over to using dragMove.
> Here there was some limited succuess.  The message would fire when a
> chunk was dragged in from another field, however the message would
> never originate from mouse operations in the field itself, the chunk
> always had to come from some other field.
>
> on dragMove
>   answer "Dragging"
> end dragMove
>
>   Since that wasn't really what I had in mind either I tried the last
> one, the dragDrop message.  Again, this message won't fire at all,
> even if text is dragged from another field entirely.
>
> on dragDrop
>   answer "Dropped"
> end dragDrop
>
>   Is it possible to properly detect drag and drops in list type
> fields?  If so can the line which the drag and drop is targetting in
> the field be detected during the drag or at the end of it?  Any
> suggestions would be appreciated.
>
> Thanks,
> Levi

----------------------------------------------------------------
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

Plugins, tutorials and more on our 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