Setup a Scrollbar?
Brian Yennie
briany at qldlearning.com
Wed Apr 19 17:34:11 EDT 2006
Scott,
I think the trick is that you have to also increase the endValue when
you increase the thumbSize (not very intuitive, I know).
Try this. Set:
startValue: 0
endValue: 100
Now scroll all the way down and check the thumbPosition... it's 67, not
100.
So you probably want something more like:
endValue = 100*( (height of fld 1/(formattedHeight of fld 1 - height of
fld 1))+1)
thumbSize = endValue *(height of fld 1)/(formattedHeight of fld 1)
For example, if you formattedHeight is 150 and your field is 50, you
get:
endValue = 100 * (1 + 50/100) = 150
thumbSize = 150 * (1 / 3) = 50
And so you have a thumb which is 1/3 the height of the scrollbar - same
as the field is 1/3 the height of it's contents.
Hope that helps - !
- Brian
> Recently, Malte Brill wrote:
>
>> try:
>>
>> startValue: 0
>> endValue: formattedheight of fld - height of fld - margins of fld
>> (if
>> <1 no scroll)
>> pageInc: 1
>> lineInc: 1
>> thumbSize: 1
>
> Thanks Malte -- this is pretty much what I tried. My problem is
> getting the
> thumb correctly sized so, for example, if the field holds 14 items and
> the
> lines number 15, you get a fairly large thumb, instead of the tiny
> version
> when its size is set to 1. When I try this:
>
> set the thumbSize of sb myScroll to \
> trunc(endValue of sb myScroll*(height of fld 1/formattedHeight of
> fld 1))
>
> ...the last lines of the field are not accessible. Guess I'm
> wondering what
> the correct proportion is.
>
> Thanks & Regards,
>
> Scott Rossi
> Creative Director
> Tactile Media, Multimedia & Design
> -----
> E: scott at tactilemedia.com
> W: http://www.tactilemedia.com
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
>
>
More information about the use-livecode
mailing list