Discrete scrollbar settings

Jim Hurley jphurley at jps.net
Sun Feb 17 20:22:01 EST 2002

>on scrollbarDrag
>   set the thumbPos of me to (the thumbpos of me)
>end scrollbarDrag
>This sort of "snaps" to the proper thumbpositions, but it flickers as it's
>doing so. I'll keep hunting for a better solution, but it would be great if
>Rev had a "snapToPage" property (or equivalent) that would take the
>flickering away.

As W. C. Fields would say: "Pardon my redundancy."

Much simpler:

local temp

on scrollbarDrag
   set startValue  of me to 1
   set endvalue of me to 3
   put  the thumbposition of me into temp
   put round(temp) into temp
end scrollbarDrag

on mouseUp
   set the thumbposition of me to temp
end mouseUp
Jim Hurley

More information about the Use-livecode mailing list