hypertext and "hand" cursor

Alex Rice alrice at ARCplanning.com
Tue Jul 15 15:51:00 EDT 2003


It seems that Rev's normal cursor handling doesn't switch between an 
arrow and a hand for hypertext. Here is a way I came up with.

--
-- mouseEnter/Leave
-- cursor changing for hypertext fields. does not conflict with other 
cursors like i-beam over
-- editable fields. put this in a card or stack to handle all hypertext 
fields.
--
on mouseEnter
   if the textStyle of the target = "link" then
     set the cursor to hand
     lock cursor
   end if
   pass mouseEnter
end mouseEnter

on mouseLeave
    if the textStyle of the target = "link" then
     set the cursor to the defaultCursor
     unlock cursor
   end if
   pass mouseLeave
end mouseLeave


Alex Rice, Software Developer
Architectural Research Consultants, Inc.
http://ARCplanning.com




More information about the use-livecode mailing list