<doc>
  <legacy_id>1619</legacy_id>
  <name>formattedWidth</name>
  <type>property</type>
  <syntax>
    <example>get the formattedWidth of <i>object</i></example>
    <example>get the formattedWidth of [<i>chunk</i> of] <i>field</i></example>
  </syntax>
  <library></library>
  <objects>
    <button/>
  </objects>
  <synonyms>
  </synonyms>
  <classification>
    <category>Appearance &amp; Positioning</category>
  </classification>
  <references>
    <command tag="revChangeWindowSize">revChangeWindowSize Command</command>
    <function tag="textHeightSum">textHeightSum Function</function>
    <property tag="margins">margins Property</property>
    <property tag="dontWrap">dontWrap Property</property>
    <property tag="thumbSize">thumbSize Property</property>
  </references>
  <history>
    <introduced version="1.0">Added.</introduced>
  </history>
  <platforms>
    <mac/>
    <windows/>
    <linux/>
    <ios/>
    <android/>
  </platforms>
  <classes>
    <desktop/>
    <server/>
    <web/>
    <mobile/>
  </classes>
  <security>
  </security>
  <summary>Reports the width needed by an <glossary tag="object">object</glossary> to display its full contents without scrolling.</summary>
  <examples>
    <example>if the formattedWidth of this card &gt; the width of this card then beep</example>
  </examples>
  <description>
    <p>Use the <b>formattedWidth</b> <glossary tag="property">property</glossary> to adjust an <glossary tag="object">object's</glossary> size according to the space needed to display its contents.</p><p/><p><b>Value:</b></p><p>The <b>formattedWidth</b> of an <glossary tag="object">object</glossary> is a positive <keyword tag="integer">integer</keyword>. The <i>object</i> must be on the <glossary tag="current card">current card</glossary> of an open <object tag="stack">stack</object>.</p><p/><p>This property is read-only and cannot be set.</p><p/><p><b>Comments:</b></p><p>If you specify a card or group, the <b>formattedWidth</b> reports the width of a rectangle that includes all <glossary tag="object">objects</glossary> in that <keyword tag="card">card</keyword> or <command tag="group">group</command> whose <property tag="visible">visible</property> <glossary tag="property">property</glossary> is true.</p><p/><p>If you specify an image or player, the <b>formattedWidth</b> <glossary tag="property">property</glossary> reports the original un-scaled width of the <keyword tag="image">image</keyword> or movie.</p><p/><p>If you specify a field, the <b>formattedWidth</b> reports the width required by the <glossary tag="field">field's</glossary> text. If the <glossary tag="field">field's</glossary> <property tag="dontWrap">dontWrap</property> <glossary tag="property">property</glossary> is set to true, the <b>formattedWidth</b> reports the total width of the text in the <keyword tag="field">field</keyword>. If the <b>dontWrap</b> is false, the <b>formattedWidth</b> reports the minimum width required to keep the current line breaks.</p><p/><p>If you specify an object in a group, the value reported is the <b>formattedWidth</b> that <glossary tag="object">object</glossary> requires for the <glossary tag="current card">current card</glossary>, so if you want to get the <b>formattedWidth</b> of a <glossary tag="field">field's</glossary> text on a certain <keyword tag="card">card</keyword>, you must go to that <keyword tag="card">card</keyword> first.</p><p/><p>The <b>formattedWidth</b> of a <glossary tag="chunk">chunk</glossary> in a <keyword tag="field">field</keyword> is the amount of horizontal space that portion of the <glossary tag="field">field's</glossary> text requires, taking line breaks into account.</p>
  </description>
</doc>