Scrolling a Card?
doug at webcrossing.com
Thu Feb 19 19:53:28 CST 2004
Thanks, Ken. That is a pretty good explanation. I will try some experiments.
On 2/20/04 10:27 AM, "Ken Ray" <kray at sonsothunder.com> wrote:
>> But what confuses is me is what does it mean by "make the
>> group the same size as the stack window..."? If you do that,
>> what is the scroll for?
> Here's an example: Let's say you want to be able to view an image that
> is larger than the current card. You'll need to be able to scroll to be
> able to get to the various parts of the image to view. From the user's
> perspective they think they're scrolling the window, but what's really
> happening is that they're scrolling the group.
> To make this happen:
> 1) Find/make a large image (let's say 800x600).
> 2) Create a stack whose size is 640x480
> 3) Import the image onto the card - it will (of course) be too big to
> fit, but it will still be there.
> 4) With the image selected, group it (choose "Group Selected" from the
> Object menu)
> 5) Then, set the rect of the group to the rect of the card ("set the
> rect of group 1 to the rect of this card")
> 6) Open the Properties palette for the group and display the vertical
> and horizontal scrollbars
> 7) Set the lockLocation of the group to true
> 8) Switch to browse mode, and you'll see that you'll be able to use the
> scrollbars in the group to see the different parts of the image.
> The bottom line is that if the size of the group object is *small* than
> the size of the contents of the group, you can use the scrollbars of the
> group to navigate within that "space". The reason for setting the
> lockLocation of the group to true is that if you leave it false, the
> next time you add or adjust an object that is *inside* of the group (say
> with the pointer tool and "Select Grouped" turned on in the toolbar),
> the group will automatically expand to a size that fits its contents. If
> you set the lockLocation to true, the group will stay at whatever size
> it was resized to regardless of the size of its contents.
> Ken Ray
> Sons of Thunder Software
> Email: kray at sonsothunder.com
> Web Site: http://www.sonsothunder.com/
> use-revolution mailing list
> use-revolution at lists.runrev.com
More information about the use-livecode