Form layout offers the programer a bit more control when designing Ui layout. Each control ie Text Fields, Buttons, Input Text are positioned in relation to each other by stipulating in the code which edge you want to join with the other.
Similar to a jigsaw puzzle - you can't float a piece on a table, it has to be connected to the surrounding pieces.
Good Flags to Use:
formLayout myForm;
This will create a form layout called "myForm", naming is very important in order to refer to it later.
formLayout -e
The -e field allows you to edit the command, can also use a -q to query it. The commands keyed under formLayout -e will determine the positioning of its components. This should then be closed off by ;
-attachForm (-af)
// Attaches the component to the form. This should be followed by two strings (the name of the component and the edge you wish to attach) and an integer (the offset from that edge). Typically should look like:
-attachForm component name 0
-attachControl (-ac)
//Attaches control to another control. Requires four arguments string, string, integer, string. Typically should look like:
-attachControl control top 0 second controler
All these commands and fields are listed in the Maya help guide which also provides an example of the correct syntax.
Tuesday, 23 February 2010
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment