On 11/18/10 6:41 PM, Bill Vlahos wrote:
Getting closer now.

If I put the following script in the source list field the correct text is sent 
in the drag.
on mouseDown
    set the dragData["text"] to the selectedText
end mouseDown

Target field script hilites the correct line in the list
on dragMove
   set the hilitedLines of me to (word 2 of the mouseLine)
end dragMove

However, if I also put this script in the target field script nothing happens:
on dragDrop
    put the dragData["text"]
    pass dragDrop
end dragDrop

What I need is the dragged text and the target field line. I believe I can only 
get that from the target field not the source field but I can't figure out how.

Add a "dragEnter" handler to the target field:

on dragEnter
  set the dragAction to "copy" -- there are other options
end dragEnter

on dragMove
  set the hilitelines of me to (word 2 of the mouseline)
end dragMove

on dragDrop
  put the dragData["text"}
  pass dragDrop
end dragDrop

As is, the dragdrop handler just puts the text into the message box. If you want it dropped into the field, supply a position, like "put the dragData["text"] & cr before the mouseline".

--
Jacqueline Landman Gay         |     jac...@hyperactivesw.com
HyperActive Software           |     http://www.hyperactivesw.com
_______________________________________________
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to