multi scroll

J. Landman Gay jacque at hyperactivesw.com
Wed Feb 16 16:57:38 EST 2011


On 2/16/11 11:37 AM, dunbarx at aol.com wrote:
>
>
> I remember something about this early in my LC career. I want to
> lock-step scrolling among a dozen or more fields.
>
> The scrollBarDrag message in one field does the trick:
>
> on scrollbarDrag
>     lock screen
>     repeat with y = 3 to 15
>        set the scroll of fld y to the scroll of me
>     end repeat
>     unlock screen
> end scrollbarDrag
>
> But is this the best way? I sort of remember that a group worked
> better, but am not sure how to implement this. It is not just a
> matter of adding a scrollbar to a group of scrolling fields. That
> works quite differently.

Make the fields non-scrolling, group them, and set them all to the 
formattedheight of the longest one. (You may need to realign the tops.) 
Set the group to use a vertical scrollbar, and it will scroll all the 
fields automatically without any scripts. It's also a little smoother 
and more efficient than the scripted method.

-- 
Jacqueline Landman Gay         |     jacque at hyperactivesw.com
HyperActive Software           |     http://www.hyperactivesw.com




More information about the Use-livecode mailing list