On 27/10/00 11:04 am, Peter Reid <[EMAIL PROTECTED]> wrote:

> I'm trying to create objects in a vertical scrolling group using
> scripting.  I'm attempting to reproduce behaviour somewhat like a
> browser, so that a series of constant sized images layout in a set of
> rows and columns (a bit like laying playing cards).  Because there
> are a variable number of images, I need these to be created in a
> group with a vertical scroll bar, so the user can scroll down to
> those images off screen.
> 
> What's working OK - I can create these images within a group and name
> them uniquely.  Also, I seem to be able to generate the right
> sequence of topLeft coordinates for positioning of each image in a
> grid pattern.
> 
> What's NOT working - even though the topLeft coordinates look
> sensible, the images are being located all over the place!  Clearly,
> my topLeft coordinates are not correct in these circumstances, even
> though they look correct as if I were placing the images on a large
> static piece of paper.
> 
> Can anyone explain how the coordinates work within a group that can scroll??

The coordinates are measured relative to the topLeft of the card, so if the
group has scrolled you need to allow the h and v scroll properties in your
calculation of location of the objects.  The easiest thing to do is usually
to scroll the group to 0 before placing any objects.

Regards,

Kevin

Kevin Miller <[EMAIL PROTECTED]> <http://www.runrev.com/>
Runtime Revolution Limited (formerly Cross Worlds Computing).
Tel: +44 (0)131 672 2909.  Fax: +44 (0)1639 830 707.


Archives: http://www.mail-archive.com/[email protected]/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.

Reply via email to