<doc>
  <legacy_id>2178</legacy_id>
  <name>revChangeWindowSize</name>
  <type>command</type>
  <syntax>
    <example>revChangeWindowSize <i>newWidth</i>,<i>newHeight</i>[,<i>anim</i>[,<i>cardNumber</i>[,<i>totalTime</i>]]]</example>
  </syntax>
  <library>Common library</library>
  <objects>
  </objects>
  <synonyms>
  </synonyms>
  <classification>
    <category>Windows &amp; Dialog Boxes</category>
    <category>Standalone Applications</category>
  </classification>
  <references>
    <property tag="formattedHeight">formattedHeight Property</property>
    <property tag="formattedWidth">formattedWidth Property</property>
    <property tag="height">height Property</property>
    <property tag="location">location Property</property>
    <property tag="lockLocation">lockLocation Property</property>
    <property tag="rectangle">rectangle Property</property>
    <message tag="resizeStack">resizeStack Message</message>
    <property tag="width">width Property</property>
  </references>
  <history>
    <introduced version="2.0">Added.</introduced>
  </history>
  <platforms>
    <mac/>
    <windows/>
    <linux/>
  </platforms>
  <classes>
    <desktop/>
    <server/>
    <web/>
  </classes>
  <security>
  </security>
  <summary>Changes the height and width of a <object tag="stack">stack</object> window.</summary>
  <examples>
    <example>revChangeWindowSize 100,120</example>
    <example>revChangeWindowSize the width of stack "Template",200,"slide"</example>
    <example>revChangeWindowSize myWidth,myHeight,"snap",1 <code><i>-- displays card 1</i></code></example>
    <example>revChangeWindowSize 200,250,"slide",,500 <code><i>-- slides over 1/2 second</i></code></example>
  </examples>
  <description>
    <p>Use the <b>revChangeWindowSize</b> <glossary tag="command">command</glossary> to change the size of a stack while leaving its top left corner in place, with optional animation effects.</p><p/><p><b>Parameters:</b></p><p>The <i>newWidth</i> is a positive <keyword tag="integer">integer</keyword>.</p><p/><p>The <i>newHeight</i> is a positive <keyword tag="integer">integer</keyword>.</p><p/><p>The <i>anim</i> is either "snap" or "slide". If the <i>anim</i> is "slide", the <property tag="height">height</property> and <property tag="width">width</property> are changed during the length of time specified in <i>totalTime</i>, with the window edges sliding gradually instead of snapping to their new position. If the <i>anim</i> is "snap", or if no <i>anim</i> is specified, the <property tag="height">height</property> and <property tag="width">width</property> are changed immediately.</p><p/><p>The <i>cardNumber</i> is the <function tag="number">number</function> of a <keyword tag="card">card</keyword> in the <object tag="stack">stack</object>. The <object tag="stack">stack</object> displays the <keyword tag="card">card</keyword> with this number during the transition, and returns to the original <keyword tag="card">card</keyword> at the end. If the <i>anim</i> is not "slide", the <i>cardNumber</i> has no effect.</p><p/><p>The <i>totalTime</i> is the number of milliseconds to take for the slide effect. If the <i>anim</i> is not "slide", the <i>totalTime</i> has no effect and the change takes place immediately. By <keyword tag="default">default</keyword>, the <i>totalTime</i> is 250 (1/4 second).</p><p/><p><b>Comments:</b></p><p>The <b>revChangeWindowSize</b> <glossary tag="command">command</glossary> resizes a <glossary tag="stack window">stack window</glossary> to the <i>newWidth</i> and <i>newHeight</i>.</p><p/><p>There are two differences between using the <b>revChangeWindowSize</b> <glossary tag="command">command</glossary> and simply changing the <glossary tag="stack">stack's</glossary> <property tag="height">height</property> and <property tag="width">width</property> <property tag="properties">properties</property>:</p><p/><p>* The <b>revChangeWindowSize</b> <glossary tag="command">command</glossary> shrinks or grows the window from its top left corner: the window's top and left edges stay in place, while the bottom and right edges move. Setting the <property tag="height">height</property> and <property tag="width">width</property> <property tag="properties">properties</property> leaves the center of the window in place while all four edges move inward or outward.</p><p/><p>* The <b>revChangeWindowSize</b> <glossary tag="command">command</glossary> lets you change the window size by optionally sliding the edges over a specified time period, and displaying a <keyword tag="card">card</keyword> during the transition.</p><p/><p><code/><b>Note:</b><code/> In a standalone application the <glossary tag="Common library">Common library</glossary> is implemented as a hidden <command tag="group">group</command> and made available when the <command tag="group">group</command> receives its first <message tag="openBackground">openBackground</message> message. During the first part of the <glossary tag="application">application's</glossary> startup process, before this <keyword tag="message box">message</keyword> is sent, the <b>revChangeWindowSize</b> <glossary tag="command">command</glossary> is not yet available. This may affect attempts to use this <glossary tag="command">command</glossary> in <message tag="startup">startup</message>, <message tag="preOpenStack">preOpenStack</message>, <message tag="openStack">openStack</message>, or <message tag="preOpenCard">preOpenCard</message> <glossary tag="handler">handlers</glossary> in the <glossary tag="main stack">main stack</glossary>. Once the <glossary tag="application">application</glossary> has finished starting up, the <command tag="start using">library</command> is available and the <b>revChangeWindowSize</b> <glossary tag="command">command</glossary> can be used in any <glossary tag="handler">handler</glossary>.</p>
  </description>
</doc>