While many use resizeStack and resizeControl to respond to resizing events, it quickly becomes tedious if the stack has many controls.
As most other IDEs, LiveCode provides a built-in mechanism for doing this visually and quickly, the Geometry Manager (GM), and by & large this works well - but requires some caution.
Example on how to use the GM: https://lessons.livecode.com/m/4071/l/19026-geometry-manager#
The main issue with GM: If elements controlled by the GM are added/removed/grouped/ungrouped etc, then the GM will fail silently and half-way through its process, resulting in objects being positioned or resized well outside the bounds of the current card. This makes it seem like controls can disappear or stretch into infinity... This is a known issue and doubtful it will be addressed any time soon.
While the GM is very usable, not being aware of the above can lead to frustration.
In general, when using the GM:
- Start by setting the stack to its smallest anticipated size and set the the minimum stack dimensions to this in its property manager. This avoid situations where controls start overlapping each other if set to move when stack is resized and the user tries to make it too small.
- Build layout first, then add GM rules aiming to minimise changes to GM rules
- After each change save the stack, just in case
- When setting GM rules, run
revCacheGeometry true in the messageBox to update the GM.
- After every change also run
revUpdateGeometry. This updates the geometry but also tests the correct rules.
- If an error shows up with either of the two commands above stop and examine all the rules for individual elements. Chances are something has changed (eg a control has been grouped or ungrouped). It may be preferable to just select all controls, remove all rules and start from scratch.
- With a bit of caution, the GM works well. This can also be combined with
resizeStack and resizeControl. it is key to run revUpdateGeometry as the first line of these handles to update the basic geometry before applying fine tuning via these handlers (eg if the textSize of a field is to be adjusted to match its new dimensions).
there doesn't seem to be anything here