thumbPosition and Simple Math

Jim Hurley jhurley at
Sat Feb 26 17:24:27 EST 2005

>  > Try looking in the scrollbar inspector. Use the tiny arrows to increase
>  > the thumbposition. You should see the position of the thumb change on
>>  the scrollbar *and* the value in field should increase but remain 50
>  > units greater than the thumbposition.
>I tested this, and it does work.  So from what I'm experiencing, it is
>only occuring when you are actually dragging the thumb of the scrollbar.
>   I'm not exactly sure what this means, but it means that some of my
>software is not going to work properly now.
>Derek Bumpy


I guess I don't really know what you mean when you say it does work 
in the inspector, but you don't expect some of your software won't 
work properly.

As a diagnostic, try this script in the scrollbar:

on scrollBarDrag
   put the thumbPosition of me into theNum
   add 50 to theNum
   put the thumbposition of me & cr &  round(theNum) into fld 1
end scrollBarDrag

So that you can see both the thumbposition and the evaluated sum in the field.

This script should give the same results

on scrollBarDrag tPos
   put tPos + 50 into theNum
   put tPos & cr &  round(theNum) into fld 1
end scrollBarDrag


More information about the use-livecode mailing list