Making a UI go from Left to Right?

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

Thread Tools Search this Thread Display Modes
  10 October 2010
Making a UI go from Left to Right?

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...
over analyzing seperates the body from the mind
  10 October 2010
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 October 2010
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...
over analyzing seperates the body from the mind
  10 October 2010
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 October 2010
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 October 2010

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 October 2010
may I quote Nathan at this point?
I mean I didn't have any bad experiences with it so far.. just saying.
  10 October 2010
Thread automatically closed

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.
CGTalk Policy/Legalities
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
Thread Closed share thread

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Society of Digital Artists

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump

All times are GMT. The time now is 08:06 AM.

Powered by vBulletin
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.