Card Vertical Scrollbars

J. Landman Gay jacque at hyperactivesw.com
Thu Dec 23 13:34:23 EST 2010


On 12/23/10 11:27 AM, Peter Haworth wrote:
> Thank you Richard and Jacquie. Yes my frustrations are making a little
> too judgemental, good job this list is providing an outlet for that!

Hey, that's why we're here. And there are lots of other people out there 
who will read these responses and find help, so you are doing a public 
service by asking. :)

>
> Just to be clear, I'm not trying to resize a group.

I know, not specifically, but you will have to in order to get the 
results you're after.

> Someone on the list gave me the idea of grouping all the objects on the
> card together and placing a scrollbar on the group so that the user on
> the lower resolution screen would be able to scroll the contents of the
> card. Which begs the question of why cards can't have scrollbars but
> that's a different discussion.

It's the easiest and best solution, so you are on the right track. BTW, 
no operating system provides scrollable windows. What look like 
scrollable windows in other apps are exactly what you're implementing -- 
scrollable content in a fixed window.

> I planned to detect the screen resolution
> on startup and resize the windows by script as necessary to fit on the
> screen. I have no desire to resize the group or any controls on the
> card. I just want the contents of the group to be scrollable when either
> the user or a script resizes the window in a way that not all of the
> contents of the group are visible.

Ok, in that case it's easy. When your script resizes the window, have it 
also resize the group. You need to do that because the locked group (it 
must be locked) will not change size automatically, it has to be told to 
fit the window. If the group's contents exceed the group's size, the 
scrollbars will activate automatically. If the group is large enough to 
accomodate all its contents, scrollbars will disable automatically.

The one liner I mentioned should be all you need in your own handler 
and/or a resizestack handler.

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




More information about the use-livecode mailing list