chasing the thumb in a scrollbar

dunbarx dunbarx at aol.com
Fri Feb 6 00:32:45 EST 2009


Can't you get the position of the thumb by checking the scroll of the field?

If you know how many lines in the field, and you know the scroll of the field, you can calculate the percentage of the height of the field that the thumb is currently indicating. Since you know the top and bot of the field, you can get the thumbLoc. Write a function, and just call it when you need it.

Craig Newman


On Feb 6, 2009, at 12:18:12 AM, "Mark Swindell" <mdswindell at cruzio.com> wrote:
Can one refer to the location of just the thumb of a scrollbar 
relative to its window? I want to chase the thumb with a a graphic... 
essentially a transparent rectangle whose left would stick to the left 
of a horizontal scrollbar and whose right would follow the thumb as it 
moves. I can use the mouseLoc to come close, but it isn't exact, and 
I also need to refer to the loc of the thumb from outside the 
scrollbarDrag handler.




More information about the use-livecode mailing list