Looking for more info on hScroll
Wouter
wouter.abraham at pi.be
Sat Jul 31 18:46:37 EDT 2004
Re: Looking for more info on hScroll
• From: Trevor DeVore
• Subject: Re: Looking for more info on hScroll
• Date: Sat, 31 Jul 2004 12:18:08 -0700
--snip
> I did some more tests and I think the design of my slider is what is
> causing the problem. I added a call which prints out the value of
> formattedWidth - width - margins - borderWidth and as my custom group
> slider got to the end of the group the value increased. My custom
> slider which is part of the group itself was extending past the
> previous extreme right side of the group and adding a couple of more
> pixels to the group. Though the formattedHeight increases the highest
> value of hScroll for the group doesn't seem to be updated. I will keep
> fiddling around and see if I can pinpoint exactly what is going on
> though.
>
>
> Thanks,
Aha you used a custom slider in the group. I thought you used the
horizontal scrollbar of the group itself.
I bugzilla'ed an extra problem with sliders (bug #1912). May be this
applies also in your case.
Be careful with the value of the thumbpos if the numberformat is not
used.
You *see* ints but internally it still remain decimals which are
trunc-rounded in a weird way when needed in for example a repeat loop.
Test with 2 sliders endvalue 10
on mouseUp
put the thumbpos of sb 1 into t1
put the thumbpos of sb 2 into t2
put the thumbpos of sb 1 + the thumbpos of sb 2 into t3
put t1 + t2 into t4
repeat with i = 1 to t1
add 1 to x
end repeat
repeat with i = 1 to t2
add 1 to x
end repeat
repeat with i = 1 to t4
add 1 to y
end repeat
put t1 &cr& t2 &cr& t3 &cr& t4 &cr& x &cr& y
end mouseUp
And see the values produced with the sliders in different positions
(without changing the visible thumpos value)
Greetings,
WA
More information about the use-livecode
mailing list