Geometry FIX
MisterX
b.xavier at internet.lu
Tue Apr 6 01:12:31 EDT 2004
In case it happens to you, here's a script that will put
everything back in the stack. Well almost. Note: it may
screw some things up too but it fixes more things that
it screws them (like a certain geo thing)...
enjoy
Xavier
on mouseup
local d=4
# d controldelta
put d into minw
put the top of btn "view" + 24 + d into minh
put the width of this stack - d into maxw
put the height of this stack - 24 - d into maxh
repeat with x = 1 to the number of controls
put the parent of control x into xp
if "group" is in xp then
put the top of xp - d into minw
put the left of xp - d into minh
put the bottom of xp - d into maxw
put the left of xp - d into maxh
end if
get the rect of control x
put it into xr
if item 1 of xr < minw
then next repeat
if item 2 of xr < minh
then put minh into item 2 of xr
if item 3 of xr > maxw
then put maxw into item 3 of xr
if item 4 of xr > maxh
then put maxh into item 4 of xr
if it is not xr
then set the rect of control x to xr
if the height of control x < 20 then
set the height of control x to 20
set the top of control x to item 2 of xr
end if
if the width of control x < 20 then
set the width of control x to 20
set the left of control x to item 1 of xr
end if
--
end repeat
end mouseup
More information about the use-livecode
mailing list