How to set a field in place with dragenter and a singleclick?
J. Landman Gay
jacque at hyperactivesw.com
Mon Dec 19 14:38:08 CST 2005
William de Smet wrote:
> Thanks for your reply Jacgueline,
> When I put the "grab" command as the last thing the feld is going
> nowhere (I can't grab it).
> The script works for me as well but want I want is a single mouseclick
> to unlock the cursor.
> With this script I need to doubleclick tomake it happen. And that's to
> difficult for the children I work with.
After reading your other responses, I see now that you do not want to
hold down the mouse. I missed that when I first read your message. That
is why the "grab" command does not work -- "grab" requires that the
mouse is down.
So instead, try something like this:
if lDragObj = empty then
put the name of the target into lDragObj
-- do other things here when object is being dragged
put empty into lDragObj
-- do other things here when object is "dropped"
on mouseMove x,y
if lDragObj <> empty then set the loc of lDragObj to x,y
Jacqueline Landman Gay | jacque at hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
More information about the use-livecode