Stupid Programming Challenge

Tereza Snyder tereza at califex.com
Mon Nov 27 23:53:49 EST 2006


On Nov 27, 2006, at 10:25 PM, Tereza Snyder wrote:

>
> On Nov 27, 2006, at 9:54 PM, Scott Rossi wrote:
>
>> OK, I've beaten my head against the wall long enough on this, so I'm
>> throwing it out there for anyone who wants to try their hand at a  
>> simple (?)
>> challenge:
>>
>> 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.
>>
>>   go url "http://www.tactilemedia.com/download/sbfix.rev"
>
>
> 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"))
>
>
> or is there more to the problem?
>

oops forgot to say I changed:

set thumbsize of sb "scroller" to 100 * (height of group "master" /  
formattedheight of group "master")


to:


set thumbsize of sb "scroller" to  (height of group "master" )




-- 
Tereza Snyder

    Califex Software, Inc.
    www.califexsoftware.com




More information about the use-livecode mailing list