set the cursor to hand when on links
André.Bisseret
Andre.Bisseret at inria.fr
Thu Jan 19 11:33:18 EST 2006
Hello Éric,
and thank you for your kind attention to my problem.
In fact, there is a problem with the new script : as soon as the mouse
enter any field, I get an error message ; it seems to concern the line
"case "field" is in the target and "link" is in the textStyle of the
mouseText" ; meanwhile, as expected, the cursor is keeping the default
form except on a link in the field, where it takes the hand form. Il
will study that a bit later.
Anyway, my problem is solved with the first script you send to me ; it
works well.
I am learning a lot about "mouseMove" and the "switch" structure which
I didn't use before.
Thanks again
All the bests from Grenoble,
André
Le Wednesday, 18 Jan 2006, à 16:39 Europe/Paris, Eric Chatonet a écrit :
> Hi André,
>
> Your reply made me understand that, when empty, the mouseChunk could
> pop up an error while the mouseText does not.
> Then here a simplified script:
>
> on mouseMove
> switch
> case "button" is in the target
> ShowHandCursor #
> break
> case "field" is in the target and "link" is in the textStyle of the
> mouseText
> ShowHandCursor #
> break
> default
> ResetCursor #
> end switch
> end mouseMove
> ------------------------------
> on mouseLeave
> ResetCursor #
> end mouseLeave
> ------------------------------
> on ShowHandCursor
> set the cursor to hand
> lock cursor
> end ShowHandCursor
> ------------------------------
> on ResetCursor
> unlock cursor
> end ResetCursor
>
> Best Regards from Paris,
> Eric Chatonet
>
More information about the use-livecode
mailing list