View Full Version : help with formLayout
03-26-2003, 05:28 PM
Can someone please explain to me how formLayout works. I mean in really, really really simple terms. I've tried going though the example in the docs but it's confusing the hell out of me!:eek:
03-26-2003, 06:03 PM
Basically, formLayout lets you specify a list of controls that are going to be "pinned" to each other, to the enclosing window, or to other controls. That's the idea of all the -attach<whatever> options.
In the example from the documentation, the commands make a window containing a formLayout, make a couple of buttons, and make a columnLayout within the formLayout.
Then, the formLayout -edit command is used to fix the positions of the two buttons and the columnLayout with respect to the edges of the form. When the window is resized, these objects will move in the window to keep the relative positions specified in the formLayout -edit command.
Try running the command without the formLayout -edit command to see what happens, then one by one add the groups of arguments that deal with each button. It should be a lot more clear.
03-26-2003, 06:26 PM
here youcan find a small introduction/tutorial
03-26-2003, 08:45 PM
Thanks for the pointers guys. After some digging and a lot of test scripts I think I've got the hang of it now! I've also managed to get my head round the whole parenting thing, I've discovered that naming and specifying parents for everything is a very good idea!:)
Thanks for that link, X-Tender....
I've been doing a UI with rowLayout and columnLayout - once I've finished the underlying code, I'm gonna completely redo the layout, using formLayout....
01-14-2006, 07:00 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.