<doc>
  <legacy_id>1269</legacy_id>
  <name>resizeStack</name>
  <type>message</type>
  <syntax>
    <example>resizeStack <i>newWidth</i>,<i>newHeight</i>,<i>oldWidth</i>,<i>oldHeight</i></example>
  </syntax>
  <library></library>
  <objects>
    <card/>
  </objects>
  <synonyms>
  </synonyms>
  <classification>
    <category>Windows &amp; Dialog Boxes</category>
  </classification>
  <references>
    <command tag="revChangeWindowSize">revChangeWindowSize Command</command>
    <message tag="moveStack">moveStack Message</message>
    <message tag="resizeControl">resizeControl Message</message>
    <message tag="unIconifyStack">unIconifyStack Message</message>
    <property tag="maxWidth">maxWidth Property</property>
    <property tag="minHeight">minHeight Property</property>
    <property tag="resizable">resizable Property</property>
    <property tag="liveResizing">liveResizing 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>Sent to the <glossary tag="current card">current card</glossary> when the <glossary tag="stack window">stack window</glossary> is resized.</summary>
  <examples>
    <example>on resizeStack newWidth,newHeight <i>-- put an object in the middle</i></p><p>  set the location of graphic "Middle" \</p><p>     to newWidth div 2,newHeight div 2</p><p>  pass resizeStack</p><p>end resizeStack</example>
  </examples>
  <description>
    <p>Handle the <b>resizeStack</b> <keyword tag="message box">message</keyword> if you want to update the position of <glossary tag="object">objects</glossary> or do other tasks when the <glossary tag="stack window">stack window</glossary> changes size.</p><p/><p><b>Parameters:</b></p><p>The <i>newWidth</i> is the <glossary tag="stack">stack's</glossary> new <property tag="width">width</property> in <property tag="pixels">pixels</property>.</p><p/><p>The <i>newHeight</i> is the <glossary tag="stack">stack's</glossary> new <property tag="height">height</property> in <property tag="pixels">pixels</property>.</p><p/><p>The <i>oldWidth</i> is the <glossary tag="stack">stack's</glossary> original <property tag="width">width</property> in <property tag="pixels">pixels</property>.</p><p/><p>The <i>oldHeight</i> is the <glossary tag="stack">stack's</glossary> original <property tag="height">height</property> in <property tag="pixels">pixels</property>.</p><p/><p><b>Comments:</b></p><p>The <b>resizeStack</b> <keyword tag="message box">message</keyword> is sent when the user resizes the <object tag="stack">stack</object> by dragging its size box. It is also sent if a <glossary tag="handler">handler</glossary> changes the size of the <object tag="stack">stack</object> by changing its <property tag="properties">properties</property> (<property tag="width">width</property>, <property tag="height">height</property>, and so on).</p><p/><p>The <b>resizeStack</b> <keyword tag="message box">message</keyword> is sent after the resizing is finished. This means that you cannot prevent a <glossary tag="stack">stack's</glossary> size from being changed by <glossary tag="trap">trapping</glossary> this <keyword tag="message box">message</keyword>. If the <glossary tag="stack">stack's</glossary> <property tag="liveResizing">liveResizing</property> <glossary tag="property">property</glossary> is true, <b>resizeStack</b> <glossary tag="message">messages</glossary> are sent continuously during resizing, but you still cannot prevent resizing by trapping the <keyword tag="message box">message</keyword>.</p><p/><p>On Mac OS X systems when the <b>liveResizing</b> <glossary tag="property">property</glossary> is true and on all other systems, the <i>oldWidth</i> and <i>oldHeight</i> for each <b>resizeStack</b> <keyword tag="message box">message</keyword> is the same as the <i>newWidth</i> and <i>newHeight</i> for the previous <b>resizeStack</b>. The <glossary tag="stack">stack's</glossary> original <property tag="width">width</property> and <property tag="height">height</property> are passed only with the first <b>resizeStack</b> <keyword tag="message box">message</keyword> sent during a resize operation. </p><p/><p>The screen is locked while a <b>resizeStack</b> <glossary tag="handler">handler</glossary> is running, so it is not necessary to use the <command tag="lock screen">lock screen</command> <glossary tag="command">command</glossary> to prevent changes from being seen. (However, the <property tag="lockScreen">lockScreen</property> <glossary tag="property">property</glossary> is not set to true.)</p><p/><p><b>Note:</b> If the <glossary tag="stack">stack's vScroll property</glossary> is nonzero, the amount of scroll is not included in the <i>newHeight</i> and <i>oldHeight</i>. This means that the <glossary tag="parameter">parameters</glossary> of the <b>resizeStack</b> <keyword tag="message box"> message</keyword> are always equal to the <glossary tag="stack">stack's height</glossary> before and after resizing, regardless of the <property tag="vScroll">vScroll</property> setting.</p>
  </description>
</doc>