Hilite Lines on Hover in List Field

Sivakatirswami katir at hindu.org
Sat Sep 1 16:17:45 EDT 2007


This would be a common UI behavior:

user passes his mouseover a list field and the lines "light up"
as he goes up and down.

This is a common "I am hot link" indicator.

  but I'm not even getting to first base.

1) create list field
   default entries
    	Choice 1
  	Choice 2
	Choice 3

2) in script of fld:

on mousewithin
# from the docs for "mouseline"
   set the backgroundcolor of the mouseline to "yellow"
end mousewithin

result:

I get a recursive error when putting my mouse into the field.
Error dialog keeps popping up even if you keep closing it...
until you click "ignore. I guess that's because mouse within
is continuously polling..and mouseMove would be better,

but

on mousemove
   set the backgroundcolor of the mouseline to "yellow"
end mousemove

still throws an error

But, this works:

on mousemove
   set the backgroundcolor of line 3 of fld 1 to "yellow"
end mousemove

I missing something basic... as that line is
right out of the docs...

Can someone post an example here? Obviously one has to
turn off the background color of the previous line while
moving to the next one...

A good candidate for an addition to the
scripts in "Getting Started --> Scripting the UI"

TIA

skts






More information about the use-livecode mailing list