How do I make a large scrolling window?
Graham Samuel
graham.samuel at wanadoo.fr
Sun Apr 11 16:58:13 EDT 2004
Looking at the TD, it seems that to get a window to scroll, you make a
group of all the objects in it, make it the same size as the stack (iw. the
same size as the window the user sees), and give the group a scrollbar. The
TD and the cookbook remain silent on the question of how you get something
which **needs** to scroll, i.e. how you get objects into the space outside
the boundaries of the group. Clearly this must be possible, otherwise there
would be no need to scroll the group in the first place. To some extent I
found I can work by making the group as big as possible, putting objects
into it, and then making it smaller again so that it fits the window to be
scrolled. I managed it, although I find it counterintuitive, but it left me
with a problem.
What is not clear is what happens if you want to have the scroll distance a
lot larger (let's say higher) than the available screen size: how do you
get to see the far-off parts of the group in order to populate it in the
first place, using the usual method of positioning objects visually?
My specific requirement is to have succession of small graphics (a bit like
thumbnails in a photo album, tho actually buttons, with some other
accompanying objects), one above the other, covering a vertical distance of
perhaps 4000 pixels. It doesn't appear that the IDE provides a way of
positioning these appropriately. I would like to define the height of the
group to be (say) 4000 pixels, and then make the scrollbar active
immediately so that I can put my thumbnails in the appropriate places in
the 'invisible' part of the scrolling window by scrolling to the
appropriate part of the group. I tried this, but it didn't work (as soon as
the group got bigger than the window - i.e. stack - dimensions, the
scrollbar ceased to operate, as far as I could see).
Clearly I'm missing something, as IMO this is quite a common requirement.
Can anyone give a simple recipe to get this working? This seems like the
kind of thing that has been mentioned in recent discussions about the
documentation - there is no clear, illustrated 'how to' info about
scrollbars, unless of course I've missed it.
TIA
Graham
---------------------------------------------------
Graham Samuel / The Living Fossil Co. / UK & France
More information about the use-livecode
mailing list