View Full Version : Making a UI go from Left to Right?
10-25-2010, 03:48 AM
How do I make this happen, using rowLayout AND columnLayout both seem to arrange things up and down... I want my window to be from left to right as there is way too much stuff going up and down...
how is this done? Maybe I need a better MEL UI tutorial...
10-25-2010, 11:03 AM
I really don't understand your question Adam... A columnLayout arranges things vertically into a single column, and a rowLayout arranges things horizontally into a single row. Are you talking about filling the entire UI window with a row? There are many other layouts besides columnLayout and rowLayout. formLayout for example will allow you to manually position every child layout and control inside your formLayout, and optionally make them shrink and stretch proportionally when your resize the window.
don't forget you can also mix and match as many different layouts as you like, for example if you needed a long column of buttons in your formlayout it may be easier to put them all in a columnLayout and attach this to the form rather than attaching each button individually.
But without seeing your UI design or knowing what you want to put in it and where, it's a bit hard to offer any more specific advice.
10-25-2010, 11:28 AM
i guess i'm thinking of it in the wrong way. i would think that a column is created and you put something inside of it. then whatever you put in THE NEXT column would automatically be created to the RIGHT of that one. Kinda like a column in an HTML table.
However everytime I create a column it places the items within below...
10-25-2010, 12:49 PM
yep, you have entirely misunderstood layouts! ;)
ELF layouts have no other purpose or function than arranging their children. A columnLayout arranges any children into a vertical column. that's all it can do.
if you wanted a ROW of columns, you would create a rowLayout first as the top parent with columnLayouts as it's children.
But like I said, for UI layouts more complex than a simple vertical stack of things (even if that stack of things contains rowLayouts) you probably want to use formLayout (although even using formLayout efficiently requires an understanding of other layout types).
10-25-2010, 12:57 PM
I don't know of any UI tutorials (I take it you have read the Maya documentation on creating and using layouts already? User Guide > General > MEL and Expressions > Creating interfaces > Layouts) but if you are still struggling and want to post a drawing/screenshot mockup of the UI you are attempting to create I don't mind knocking it up in MEL to give you some pointers...
10-25-2010, 09:25 PM
i find myself using rowColumnLayout more than anything now, simply because it allows a bit more control over spacing.
so if you have -numberOfColumns 2
// this will make a layout like...
// [test1] [test2]
// [test3] [test4]
rowColumnLayout -nc 2;
button -l "test1";
button -l "test2";
button -l "test3";
button -l "test4";
10-26-2010, 01:47 PM
may I quote Nathan (http://forums.cgsociety.org/showpost.php?p=6732828&postcount=2) at this point? :wavey:
I mean I didn't have any bad experiences with it so far.. just saying.
10-26-2010, 01:47 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.
vBulletin v3.0.5, Copyright ©2000-2015, Jelsoft Enterprises Ltd.