new altPlugin: Layout Manager

Chipp Walters chipp at
Mon Apr 12 04:47:22 EDT 2004

Hi again all,

I've been working with on a few cross-platform jobs, and I've really 
needed some capabilities I couldn't find easily in RR. In particular, I 

1) A reliable Geometry Manager which could auto-generate resizeStack 
scripts, so I could later edit them if I needed to provide more dynamic 
types of object sizing and control (think sliding panes, etc..)

2) I wanted to be able to have my stacks resize themselves depending on 
the platform they are on. Also, I wanted to be abled to designate 
different sizes and behaviors for objects based upon different platforms.

3) I wanted something simple, which I can add to easily.

4) It is important for the tool to stay out of the way, and not create a 
problem when working with other tools/libraries.

So, over the last couple of weeks, I've created a new plugin called 
"Layout Manager." It's available at:

I'll try and put up a video tutorial later this week.

Thanks to Ken Ray for his support and help on some scripting issues.

As with our many other plugins, it's free. Also, there is a new update 
to the altPluginToolbar. You can just click the "check for updates" 
button on your altPluginToolbar menu and it will auto-download. The only 
feature added is a "Get Plugins" button. And all who use 
altPluginToolbar should routinely check for updates, as I often do post 
bug fixes and feature enhancements without any other notice.



 From the site:
Use Layout Manager to handle resizable stacks and control layouts for 
cross-platform applications. Here's how it works.

With Layout Manager, you can create different layouts with controls 
differently sized and with different behaviors for up to 3 different 
platforms. Layout Manager includes a library stack, and auto-generates 
resizeStack scripts, which users may modify at a later time if they wish.

Typically, you should first layout the controls on a stack which is the 
minimum width and height you want the stack to be. Then, use the Set 
MinWidth and Set MinHeight commands on the Stack tab. Now you're ready 
to set the resizer properties for those controls you wish to be 'dynamic.'

You'll need to add the altLayoutLib library stack to your project. This 
is done by clicking the add altLayout library button in the Stack tab. 
You will be then prompted to automatically insert a preOpenStack script. 
If your stack has only a single card which people will be resizing, then 
put the script in the card script, else put it in the stack script.

Please note: Layout Manager puts it's own 'on preOpenStack' handler at 
the top of the card/stack script. If you already have an 'on 
preOpenStack' handler then you'll need to manually copy the 'start using 
stack "altLayoutLib"' command into it.

Next, choose the Control tab, and choose the platform radio button 
you're currently wanting to set the resizer properties for. Use Mac OSX, 
or Win XP(and all Win32), or Other (for Linux, or Mac OS9). Now, press 
the arrow button to go to 'Pointer' mode. You can now resize controls 
and set their behaviors. Be sure and click the Set Layout Props button 
when you are finished editing a single control.

Each time you click the Set Layout Props button, Layout Manager builds 
it's own 'on resizeStack' handler at the top of the card/stack script 
you previously designated when adding the library. If you don't want 
Layout Manager to replace it's own scripts, then edit the comments next 
to the resizeStack handler and then the next time Layout Manager builds 
a resizeStack script it will insert it above your custom version. You 
only then need to cut/paste the auto-generated scripts into your own 'on 
resizeStack' handler.

One of the added benefits of taking this approach, is the developer has 
full control over the resizeStack handler and can modify it to suit 
special situations.

More information about the Use-livecode mailing list