Highlight list line on hover?
David Brooks
dbrooks at unlserve.unl.edu
Thu May 12 11:22:43 EDT 2011
I'm the menu buttons guy -- whose problem remains unresolved. The menuhistory solves one problem, but not another.
I decided to develop a workaround in which a button pops up a field that looks line a pulldown menu.
The follwing script WORKS to hilite lines in a mouseover:
on mouseWithin
put the mouseloc into theXY
put item 1 of theXY into theXX
put item 2 of theXY into theyy
put item 2 of the topleft of me into theTopLeftY
put trunc(((theYY - theTopLeftY)/18) + 0.5) into theLineNumber
select line theLineNumber of me
wait 5 milliseconds
end mouseWithin
The 18 has to do with the line heights. I've not cleaned this up; it's fist try. But, so far it works. My plan is to solve my problem using only one field (identified by object id), and to size and locate that field depending upon what the choices are and where the originating button object is on the card. (Don't ask what the theXX does; it look like a wasted line of code.)
Best,
Dave B.
More information about the use-livecode
mailing list