Stupid Programming Challenge
Scott Rossi
scott at tactilemedia.com
Tue Nov 28 00:47:24 EST 2006
Recently, Trevor DeVore wrote:
> ON initScrollbar
> set the thumbposition of sb "scroller" to 0
> set thumbsize of sb "scroller" to 100 * (height of group
> "master" / formattedheight of group "master")
> put formattedheight of group "master" - the height of grp
> "master" into theEndValue
> IF theEndValue > 0 THEN add the thumbsize of sb "scroller" to
> theEndValue
> ELSE put 0 into theEndValue
> set endvalue of sb "scroller" to theEndValue
> END initScrollbar
Your script works as well -- thanks Trevor.
I think my problem was over-interpreting the docs and coming up with some
crazy proportional math that wasn't necessary. The following two lines work
like above:
set endValue of sb "scroller" to (formattedHeight of grp "master")
set thumbSize of sb "scroller" to (height of grp "master")
Best Regards,
Scott Rossi
Creative Director
Tactile Media, Multimedia & Design
-----
E: scott at tactilemedia.com
W: http://www.tactilemedia.com
More information about the use-livecode
mailing list