formattedheight and formattedwidth

Pete pete at mollysrevenge.com
Sun Jun 26 15:52:35 EDT 2011


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.



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.


Pete
Molly's Revenge <http://www.mollysrevenge.com>




On Sat, Jun 25, 2011 at 7:04 PM, J. Landman Gay <jacque at hyperactivesw.com>wrote:

> On 6/25/11 2:17 PM, Pete wrote:
>
>> I have a number of cards in the same substack that need to be displayed
>> with
>> different heights and widths.  In the preOpenStack handlerr, I have:
>>
>> set the height of this stack to the formattedheight of this card
>> set the width of this stack to the formattedwidth of this card
>>
>> The height and width end up several pixels short of what they need to be.
>>  Adding 10 to the fomattedheight and 20 to the formattedwidth makes things
>> about right, but
>>
>
> Use the height and width, not the formattedHeight and formattedWidth. The
> formatted measurements only include the smallest area that encompasses all
> the visible objects objects. If the card objects don't touch all four sides,
> the formatted measurements will be smaller than the card measurements.
>
> --
> Jacqueline Landman Gay         |     jacque at hyperactivesw.com
> HyperActive Software           |     http://www.hyperactivesw.com
>
> ______________________________**_________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/**mailman/listinfo/use-livecode<http://lists.runrev.com/mailman/listinfo/use-livecode>
>
>



More information about the use-livecode mailing list