Discrete scrollbar settings
Jim Hurley
jphurley at jps.net
Sun Feb 17 20:14: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.
I think this might work for you. Set the scrollbar script to:
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
if temp = 1 then set the thumbposition of me to 1
if temp = 2 then set the thumbposition of me to 2
if temp = 3 then set the thumbposition me to 3
end mouseUp
--
Jim Hurley
More information about the use-livecode
mailing list