multi scroll

dunbarx at aol.com dunbarx at aol.com
Wed Feb 16 18:18:46 EST 2011


Jacques.


Hmmm. The "longest one" keeps changing, both in length and which actual  field is the longest. I see that it works in principal, though, so thanks.


Richard, I will never approach the 32K pixel limit. That is, with an ordinary lineHeight, over 2000 lines. But I take your point.


I am old fashioned, and will script the action, which is smooth. Maybe with 50 fields it could be an issue, but that would require a very wide stack.


Craig





-----Original Message-----
From: J. Landman Gay <jacque at hyperactivesw.com>
To: How to use LiveCode <use-livecode at lists.runrev.com>
Sent: Wed, Feb 16, 2011 4:57 pm
Subject: Re: multi scroll


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 
 
_______________________________________________ 
use-livecode mailing list 
use-livecode at lists.runrev.com 
Please visit this url to subscribe, unsubscribe and manage your subscription preferences: 
http://lists.runrev.com/mailman/listinfo/use-livecode 

 



More information about the Use-livecode mailing list