window resizing and repositioning controls

Howard Bornstein bornstein at
Thu May 15 12:18:02 EDT 2003

>is there an easy way to
>reposition all controls on all cards at runtime and do
>it quickly?  Does anyone have a script for that?

Courtesy of Jacqueline Landman Gay:

on pushDown
   	repeat with x = 1 to the number of bgs
     		set the top of bg x to the top of bg x + 22
   	end repeat
   	repeat with x = 1 to the number of cds
     		go to cd x
     		repeat with n = 1 to the number of cd parts
       			set the top of cd part n to the top of card part n + 22
     		end repeat
   	end repeat
end pushDown

I don't know how well this will work at runtime--it will depend on the 
number of controls you have. Lock the screen and see. I use this useful 
script whenever I forget to first set up the menubar in a Mac stack 
(read: every time) and then have to reposition all the objects.


Howard Bornstein
D E S I G N  E Q

More information about the use-livecode mailing list