Stack Height/Menubar

J. Landman Gay jacque at hyperactivesw.com
Sun Nov 18 00:58:39 EST 2018


On 11/17/18 12:49 PM, Rick Harrison via use-livecode wrote:
> Does anyone have a nice routine which
> will compensate for the change in layout
> by moving all other objects farther down?
> I thought I saw a mention this before.

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 cd x
     repeat with n = 1 to the number of cd parts
       set the top of cd part n to the top of cd part n + 22
     end repeat
   end repeat
end pushDown

This is from a HyperCard-to-LC conversion tutorial. "Parts" is a HC 
synonym for "controls", which you can substitute if you want. The 
default menubar height used to be 22, but change that number if you need to.

Tutorial covering menus is here:
<http://www.hyperactivesw.com/mctutorial/rraboutMenus.html>
And the above handler is here:
<http://www.hyperactivesw.com/mctutorial/rrcreateMenus.html>

-- 
Jacqueline Landman Gay         |     jacque at hyperactivesw.com
HyperActive Software           |     http://www.hyperactivesw.com




More information about the use-livecode mailing list