Stupid Programming Challenge

Scott Rossi scott at tactilemedia.com
Tue Nov 28 00:00:53 EST 2006


Recently, Tereza Snyder wrote:

>> Modify the initScrollbar routine in the following stack such that
>> 1) the
>> scrollbar displays proportionally to content displayed in the
>> associated
>> group, and 2) the scrollbar consistently scrolls the group to the
>> end of its
>> content.  The stack contains a button to randomly populate a scrolling
>> group, and the initScrollbar routine is stored in the button.

> I had luck when I changed this line:
> 
> set endvalue of sb "scroller" to max(0,(formattedHeight of group
> "master" - height of group "master"))
> 
> to:
> 
> set endvalue of sb "scroller" to max(0,(formattedHeight of group
> "master"))

Using your modification here appears to cause the scrollbar to display
disproportionally to the amount of content in the group.  In other words,
when dragging the scrollbar, the group scrolls to the end of its content
before the thumb of the scrollbar reaches the bottom of the scrollbar (the
group seems to reach the end of the scroll when the scrollbar is dragged
about 50% down).  Not sure if this occurs on your end.


> or is there more to the problem?

Unless the above is expected behavior, I think there is.

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