Scrollbars and LittleArrows

Jim Hurley jhurley at infostations.com
Sat Sep 4 10:52:14 EDT 2004


Arthur,

I had similar problems some time ago. I still have stack with and 
arrow click of -1.

I can't remember the details, but it had something to do with the 
counter-intuitive nature of the vertical scrollbar, that is, the 
thumbposition decreases as the thumb moves up. I vaguely recall 
discussing this with Kevin. His suggestion was to deal with the 
problem in the scrollbar script.

I found that reversing the start and end values for the thumposition 
(e.g. 100 and 0 respectively) and using the following script::

on scrollbardrag theThumbPos
   set the lineinc of me  to -1
   set the pageinc of me to -10
   put theThumbpos into field 1
end scrollbardrag

gave me the behavior I wanted.

If you look at the inspector, you will find these values of -1 and 
-10 in the respective fields. You can set these values in the script 
but not in the inspector. Perhaps your negative values were the 
result of a conversion from HC or SC?

But this is the hard way.  It easier, and probably less dangerous, to 
use the script to achieve the same effect. That is

on scrollbardrag theThumbPos
   put the endvalue of me - theThumbPos into field 1
end scrollbardrag

using 1 and 10 for the line and page increments with 0 and 100 and 
the start and endvalues.

Jim


More information about the use-livecode mailing list