# Setting Geometry on cloned objects

Terry Vogelaar terry at discovery.nl
Tue Oct 8 01:23:10 EDT 2002

```Bob Rasmussen heeft op dinsdag, 8 okt 2002 om 07:20 het volgende
geschreven:
>
> Short of writing my own Geometry Manager, does anyone have any other
> bright
> ideas?

Because I never trust the GeoMan, I always use 'resizeStack'. To give
an example, I pasted the script of a stack that uses this technique.
The stack has a divider line that sets it's own 'divid' custom prop and
also calls 'arrangeElements'. It needs some typing, but it is quite
simple and gives much more predictable behaviour than the GeoMan.

It would be a useful contribution if anyone would write a kind of
GeoMan stack that just adds a properly working resizeStack handler to
the stack script.

on resizeStack
arrangeElements
pass resizeStack
end resizeStack

on arrangeElements
put the divid of btn "Divider" into perc
put the width of this stack into lWidth
put the height of this stack into lHeight
put round((perc*(lWidth-365))+120) into L40
if L40 < 120 then put 120 into L40
if L40 > (lWidth-245) then put (lWidth-245) into L40
set the rect of btn "Divider" to L40-7&",52,"&L40+1&","&lHeight-4
set the rect of btn "OTNT" to "4,52,"&L40-10&","&lHeight-4
set the rect of btn "showwhich" to
L40+4&",104,"&lWidth-4&","&lHeight-4
set the rect of fld "books" to "10,76,60,"&lHeight-10
set the rect of fld "history" to "62,76,"&L40-14&","&lHeight-10
set the rect of fld "shortcutnumbers" to
L40+6&",129,"&L40+26&","&lHeight-10
set the rect of fld "groups" to
L40+26&",130,"&lWidth-10&","&lHeight-10
set the rect of fld "head" to L40+4&",52,"&lWidth-4&",74"
set the rect of fld "subhead" to L40+4&",77,"&lWidth-4&",99"
end arrangeElements

```