Andreas Gaunitz P11 <[EMAIL PROTECTED]> wrote:

> Q: How do I reset the sprite so that it automatically adjusts to the
> size of its contents? (_Before_ displaying the contents, that is...)

Hi Andreas,

You can use the obsolete sprite property "stretch"...

  sprite(x).stretch = FALSE

... or two lines of standard Lingo:

  sprite(x).width = sprite(x).member.width
  sprite(x).height = sprite(x).member.height

Note that sprite(x).width may not be the same as sprite(x).rect.width.  The
former indicates how much the sprite has been stretched or squeezed
horizontally, the sprite().rect returns the bounding box of the sprite.  If
the sprite is skewed, rotated or quadded, this will give you larger
dimensions.

Cheers,

James

[To remove yourself from this list, or to change to digest mode, go to 
http://www.penworks.com/lingo-l.cgi  To post messages to the list, email 
[EMAIL PROTECTED]  (Problems, email [EMAIL PROTECTED]). Lingo-L is for 
learning and helping with programming Lingo.  Thanks!]

Reply via email to