How to set a field in place with dragenter and a singleclick?
William de Smet
wdesmet at wanadoo.nl
Mon Dec 19 01:39:49 EST 2005
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.
So can anyone help? Please.. : - )
TIA,
William de Smet (Mac OSX 10.4.3 and RR 2.6)
Op 19-dec-2005, om 4:53 heeft J. Landman Gay het volgende geschreven:
> William de Smet wrote:
>> Hi there,
>> For my first app I am looking for a function where a field would
>> stick to the mouseloc after a mouseclick and on the next
>> mouseclick to let the field go (I work with disabled children so
>> need to make it as easy as possible!)
>> By accident (after playing with dragEnter) I got what I want but
>> a little thing still bothers me: with the script I got so far I
>> need to doubleclick to let the field go and put it in place. What
>> I want is a singleclick to make this happen.
>> What do I need to do ?
>> Below the script I use:
>> Stackscript:
>> on dragEnter
>> end dragEnter
>> Fieldscript:
>> on mouseDown
>> grab me
>> set the layer of me to 100
>> set cursor to 28
>> lock cursor
>> set the dragdata["text"] to the short name of the target
>> end mouseDown
>> on mouseup
>> unlock cursor
>> set cursor to arrow
>> end mouseup
>
> This seems to work okay for me (Mac OS X), but if you are having
> trouble try putting the "grab" command as the last thing in your
> mousedown handler. That way everything in the handler will have
> already executed before the grab command takes over control of the
> mouse.
>
> --
> Jacqueline Landman Gay | jacque at hyperactivesw.com
> HyperActive Software | http://www.hyperactivesw.com
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
>
More information about the use-livecode
mailing list