Name: revUpdateGeometry

Type: command

Syntax: revUpdateGeometry

Summary: Moves and resizes <object|objects> according to their Geometry pane settings.

Introduced: 1.0

OS: mac,windows,linux

Platforms: desktop,server,web

Example:
revUpdateGeometry

Example:
if the width of this stack &gt; 100 then revUpdateGeometry

Description:
The LiveCode development environment automatically executes the <revUpdateGeometry> <command> when a <resizeStack> <message> is sent. Use the <revUpdateGeometry> <command> if your stack <handle|handles> the <resizeStack> <message> without passing it.

Normally, you do not need to use the <revUpdateGeometry> <command> at all, since LiveCode automatically updates geometry when a <stack> is resized. Use it only if both the following conditions are true:

1. Your stack uses the Geometry pane of the property inspector to automate object positioning and sizing when the stack window is resized, and

2. Either a handler in your stack locks messages and then moves or resizes the stack window, or a resizeStack <handler> in your <stack> does not pass the <resizeStack> <message> at the end of the <handler>.

If both these conditions are true, execute the <revUpdateGeometry> <command> in the <handler>, after the resizing is performed, to perform Geometry tasks.

>*Important:*  The <revUpdateGeometry> <command> is part of the <Geometry library>. To ensure that the <command> works in a <standalone application>, you must include this <Revolution custom library|custom library> when you create your <standalone application|standalone>. In the Inclusions section on the General screen of the <Standalone Application Settings> window, make sure that "Geometry Library" is selected in the list of script libraries.

>*Note:* When included in a <standalone application>, the <Geometry library> is implemented as a hidden <group> and made available when the <group> receives its first <openBackground> message. During the first part of the <application|application's> startup process, before this <message> is sent, the <revUpdateGeometry> <command> is not yet available. This may affect attempts to use this <command> in <startup>, <preOpenStack>, <openStack>, or <preOpenCard> <handler|handlers> in the <main stack>. Once the <application> has finished starting up, the <library> is available and the <revUpdateGeometry> <command> can be used in any <handler>.

References: resizeStack (message), startup (message), openBackground (message), preOpenStack (message), openStack (message), preOpenCard (message), revCacheGeometry (command), lock messages (command), stack (object), object (object), Geometry library (library), Revolution custom library (library), library (library), main stack (glossary), handler (glossary), handle (glossary), message (glossary), group (glossary), standalone application (glossary), Standalone Application Settings (glossary), command (glossary), application (glossary)

Tags: ui
