formattedheight and formattedwidth

Pete pete at
Sun Jun 26 19:42:05 CDT 2011

OK I see what you mean about the formatted versions of height/width.  The
straight height and width properties don't seem to come anywhere close to
working even allowing for menu bar issues (I'm on OS X). They set the
height/width to what they were for the previous card opened in the stack,
not the current card. I've tried this in preOpenStack and preOpenCard so
maybe "this card" in the prewOpen handlers is still set to the last card
opened since this one hasn't been opened yet?

I think I will have to use the formatted height and width and be consistant
about how much room is around the borders of the controls on each card.

Molly's Revenge <>

On Sun, Jun 26, 2011 at 3:55 PM, J. Landman Gay <jacque at>wrote:

> On 6/26/11 2:52 PM, Pete wrote:
>> Thanks.  I guess the dictionary is misleading (yet again) when it says:
>>       If you specify a card or group, the *formattedHeight* reports the
>> height of a rectangle that includes all objects in that card or group
>> whose
>> visible property is true.
> It seems accurate to me. The formatted measurement is the amount of space
> occupied by all visible objects on the card. It is calculated from the
> smallest rectangle that will enclose all of them. It does not include any
> empty borders around that area.
>  I tried this:
>> set the height of this stack to the height of this card
>> set the width of this stack to the width of this card
>> Is  that what you meant? That sometimes works and sometimes isn't close.
> Yes, that's what I meant, assuming you want to set the window to same size
> as the card. If you are on OS X and you have a menu bar set, the top of the
> card will be scrolled out of view, so the height of the card will actually
> be taller than what you see before you change the size. If you are getting
> extra space at the bottom of the window then that's probably why. If you are
> on Windows then the card and window height should match up without any
> differences.
> --
> Jacqueline Landman Gay         |     jacque at
> HyperActive Software           |
> ______________________________**_________________
> use-livecode mailing list
> use-livecode at
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:

More information about the use-livecode mailing list