Drag and Drop in List Field

Levi Kendall ifrag.v2 at gmail.com
Thu May 26 10:22:53 EDT 2005


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


More information about the use-livecode mailing list