<doc>
  <legacy_id>2063</legacy_id>
  <name>width</name>
  <type>property</type>
  <syntax>
    <example>set the width of <i>object</i> to <i>numberOfPixels</i></example>
  </syntax>
  <library></library>
  <objects>
    <stack/>
    <card/>
    <group/>
    <field/>
    <button/>
    <graphic/>
    <scrollbar/>
    <player/>
    <image/>
  </objects>
  <synonyms>
  </synonyms>
  <classification>
    <category>Appearance &amp; Positioning</category>
  </classification>
  <references>
    <command tag="revChangeWindowSize">revChangeWindowSize Command</command>
    <property tag="maxWidth">maxWidth Property</property>
    <property tag="hScrollbar">hScrollbar Property</property>
    <property tag="backSize">backSize Property</property>
    <property tag="orientation">orientation Property</property>
    <property tag="tabStops">tabStops Property</property>
    <property tag="left">left Property</property>
    <property tag="titleWidth">titleWidth 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>The <b>width</b> of an <glossary tag="object">object</glossary> is the distance from its left edge to its right edge.</summary>
  <examples>
    <example>set the width of the target to 100</example>
    <example>set the width of button 1 to the formattedWidth of button 1</example>
  </examples>
  <description>
    <p>Use the <b>width</b> <glossary tag="property">property</glossary> to determine how much horizontal space an <glossary tag="object">object</glossary> needs, or to make it wider or narrower.</p><p/><p><b>Value:</b></p><p>The <b>width</b> of an <glossary tag="object">object</glossary> is a positive integer.</p><p/><p><b>Comments:</b></p><p>The <b>width</b> of a <keyword tag="card">card</keyword> is always the same as the <b>width</b> of its <glossary tag="stack window">stack window</glossary>. You can set the <b>width</b> of a <keyword tag="card">card</keyword>, but doing so has no effect and doesn't change the <glossary tag="card">card's</glossary> <b>width</b> <glossary tag="property">property</glossary>.</p><p/><p>If you reduce the <b>width</b> of a <object tag="stack">stack</object>, some <glossary tag="object">objects</glossary> may end up outside the <glossary tag="stack window">stack window</glossary>. These <glossary tag="object">objects</glossary> are not shown; however, they are still there, and will be displayed if you make the window wide enough.</p><p/><p>If the object's <property tag="lockLocation">lockLocation property</property> is false, when you change its width, it shrinks or grows from the center:  the <glossary tag="object">object's</glossary> left and right edges both shift, while the object's <property tag="location">location property</property> stays the same. If the <glossary tag="object">object's</glossary> <property tag="lockLocation">lockLocation</property> <glossary tag="property">property</glossary> is true, it shrinks or grows from the top left corner: the <glossary tag="object">object's</glossary> left edge stays in the same place, and the right edge moves.</p><p/><p>The <b>width</b> of an object cannot be set to zero. Attempting to do so will set the <b>width</b> to 1 instead.</p><p/><p><img src="202652"/> <b>Cross-platform note:</b> On <glossary tag="Mac OS">Mac OS</glossary> and <glossary tag="OS X">OS X systems</glossary>, the maximum <b>width</b> of an <keyword tag="image">image</keyword> is 16384 divided by the screen's <glossary tag="bit depth">bit depth</glossary>. (For example, if the number of colors is "Millions", the maximum image width is 4096 <property tag="pixels">pixels</property>.)</p><p/><p><b>Note:</b> The current architecture uses 16-bit signed integers for all co-ordinates, which means that the value range is -32768 to 32767.</p>
  </description>
</doc>