setting cursor won't work

Anything beyond the basics in using the LiveCode language. Share your handlers, functions and magic here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
fleo
Posts: 5
Joined: Sat May 12, 2012 8:22 am

setting cursor won't work

Post by fleo » Sat Jun 16, 2012 5:41 pm

I'm trying to do what I thought was a simple and trivial task: changing the cursor to hand when hovering a button.

The button has the following script:

on mouseEnter
set the lockCursor to true
set the cursor to hand
set the lockCursor to false
end mouseEnter

It doesn't work. The cursor's shape won't change.

revCursors and revMacCursors appear loaded. The "mouseEnter" event is properly fired.

What am I missing?!

Dixie
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 1336
Joined: Sun Jul 12, 2009 10:53 am

Re: setting cursor won't work

Post by Dixie » Sat Jun 16, 2012 5:48 pm

Try this in the script of a button...

Code: Select all

on mouseEnter
   set cursor to hand
   lock cursor
end mouseEnter

on mouseLeave
   unlock cursor
end mouseLeave
be well

Dixie

fleo
Posts: 5
Joined: Sat May 12, 2012 8:22 am

Re: setting cursor won't work

Post by fleo » Tue Jun 19, 2012 1:50 pm

splendid!

Thank you! :)

Post Reply