Error getting tags :
error 404Error getting tags :
error 404 formattedWidth | revDocs | RunRev
Welcome Guest (Log in)
Product Edition
Expander triangle
get the formattedWidth of object get the formattedWidth of [chunk of] field
Desktop, Web and Server
Platform Support
MacOS,Mac OS X,Windows,Linux
None required
Reports the width needed by an object to display its full contents without scrolling.

if the formattedWidth of this card > the width of this card then beep

Additional Comments
Expander triangle

Use the formattedWidth property to adjust an object's size according to the space needed to display its contents.


The formattedWidth of an object is a positive integer. The object must be on the current card of an open stack.

This property is read-only and cannot be set.


If you specify a card or group, the formattedWidth reports the width of a rectangle that includes all objects in that card or group whose visible property is true.

If you specify an image or player, the formattedWidth property reports the original un-scaled width of the image or movie.

If you specify a field, the formattedWidth reports the width required by the field's text. If the field's dontWrap property is set to true, the formattedWidth reports the total width of the text in the field. If the dontWrap is false, the formattedWidth reports the minimum width required to keep the current line breaks.

If you specify an object in a group, the value reported is the formattedWidth that object requires for the current card, so if you want to get the formattedWidth of a field's text on a certain card, you must go to that card first.

The formattedWidth of a chunk in a field is the amount of horizontal space that portion of the field's text requires, taking line breaks into account.

User Comments
Expander triangle
User thumbnail
Peter Brigham
Sep 27, 2010
The definition for this token is listed as applying to "button" only, but -- as the examples show -- you can get the fomattedwidth of a card, a field, or a text chunk within a field.