Doh! Ummm, change cursor when over link in edit?

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

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
Garrett
Posts: 386
Joined: Sat Apr 08, 2006 8:15 am
Contact:

Doh! Ummm, change cursor when over link in edit?

Post by Garrett » Thu Sep 10, 2009 6:57 pm

We really need a section for special needs people like me who many times forget even the most basic things in Rev ;-)

I know I'm going to feel stupid on this one, but...

How do I change the mouse cursor when it's over an html link in a field?

Please, go easy on me, I beg you! :-)

Thanks in advance,
~Garrett
'What you do not want done to yourself, do not do to others.' - Confucius (550 b.c. to 479 b.c.)

SparkOut
Posts: 2949
Joined: Sun Sep 23, 2007 4:58 pm

Post by SparkOut » Thu Sep 10, 2009 7:41 pm

It's not as obvious as you think (to my knowledge anyway!)

This is more or less ripped off from the dictionary stack which has the hand pointer over a link chunk:

Code: Select all

on mouseMove
   get the mouseChunk
   if it is not empty and the linkText of it is not empty and the textStyle of it contains "link" then
      lock cursor
      set the cursor to hand
   else
      unlock cursor
   end if
   pass mouseMove
end mouseMove
Put this up the message path and it will handle mouseover cursor changes for the link text in fields.

Garrett
Posts: 386
Joined: Sat Apr 08, 2006 8:15 am
Contact:

Post by Garrett » Thu Sep 10, 2009 8:43 pm

Thank you very much SparkOut :-)
'What you do not want done to yourself, do not do to others.' - Confucius (550 b.c. to 479 b.c.)

Post Reply