<doc>
  <legacy_id>2228</legacy_id>
  <name>revUpdateGeometry</name>
  <type>command</type>
  <syntax>
    <example>revUpdateGeometry</example>
  </syntax>
  <library>Geometry library</library>
  <objects>
  </objects>
  <synonyms>
  </synonyms>
  <classification>
    <category>Appearance  Positioning</category>
    <category>Standalone Applications</category>
  </classification>
  <references>
    <command tag="lock messages">lock messages Command</command>
    <command tag="revCacheGeometry">revCacheGeometry Command</command>
  </references>
  <history>
    <introduced version="1.0">Added.</introduced>
  </history>
  <platforms>
    <mac/>
    <windows/>
    <linux/>
  </platforms>
  <classes>
    <desktop/>
    <server/>
    <web/>
  </classes>
  <security>
  </security>
  <summary>Moves and resizes <glossary tag="object">objects</glossary> according to their Geometry pane settings.</summary>
  <examples>
    <example>revUpdateGeometry</example>
    <example>if the width of this stack &gt; 100 then revUpdateGeometry</example>
  </examples>
  <description>
    <p>The LiveCode development environment automatically executes the <b>revUpdateGeometry</b> <glossary tag="command">command</glossary> when a <message tag="resizeStack">resizeStack</message> <keyword tag="message box">message</keyword> is sent. Use the <b>revUpdateGeometry</b> <glossary tag="command">command</glossary> if your stack <glossary tag="handle">handles</glossary> the <message tag="resizeStack">resizeStack</message> <keyword tag="message box">message</keyword> without passing it.</p><p/><p><b>Comments:</b></p><p>Normally, you do not need to use the <b>revUpdateGeometry</b> <glossary tag="command">command</glossary> at all, since LiveCode automatically updates geometry when a <object tag="stack">stack</object> is resized. Use it only if both the following conditions are true:</p><p/><p>1. Your stack uses the Geometry pane of the property inspector to automate object positioning and sizing when the stack window is resized, and</p><p/><p>2. Either a handler in your stack locks messages and then moves or resizes the stack window, or a <b>resizeStack</b> <glossary tag="handler">handler</glossary> in your <object tag="stack">stack</object> does not pass the <message tag="resizeStack">resizeStack</message> <keyword tag="message box">message</keyword> at the end of the <glossary tag="handler">handler</glossary>.</p><p/><p>If both these conditions are true, execute the <b>revUpdateGeometry</b> <glossary tag="command">command</glossary> in the <glossary tag="handler">handler</glossary>, after the resizing is performed, to perform Geometry tasks.</p><p/><p><img src="202653"/> <b>Important!</b> The <b>revUpdateGeometry</b> <glossary tag="command">command</glossary> is part of the <glossary tag="Geometry library">Geometry library</glossary>. To ensure that the <glossary tag="command">command</glossary> works in a <glossary tag="standalone application">standalone application</glossary>, you must include this <glossary tag="LiveCode custom library">custom library</glossary> when you create your <glossary tag="standalone application">standalone</glossary>. In the Inclusions section on the General screen of the <glossary tag="Standalone Application Settings">Standalone Application Settings</glossary> window, make sure that "Geometry Library" is selected in the list of script libraries.</p><p/><p><b>Note:</b> When included in a <glossary tag="standalone application">standalone application</glossary>, the <glossary tag="Geometry library">Geometry 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>revUpdateGeometry</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>revUpdateGeometry</b> <glossary tag="command">command</glossary> can be used in any <glossary tag="handler">handler</glossary>.</p>
  </description>
</doc>