Announcements

Between mid-October and November, the content on AREA will be relocated to the Autodesk Community M&E Hub and the Autodesk Community Gallery. Learn more HERE.

spacing in UI

spacing in UI

5rivamsi
Contributor Contributor
283 Views
1 Reply
Message 1 of 2

spacing in UI

5rivamsi
Contributor
Contributor

I'm tring to use cs=[int,int] for rowColumnLayout but couldn't understand how to use it to set space between all coloumns evenly. it's only working for one column. but "rs" flag seem to work for all rows. what am I missing? Also, I need help spacing checkboxes from checkBoxGrp().

thanks in advance

0 Likes
Accepted solutions (1)
284 Views
1 Reply
Reply (1)
Message 2 of 2

Kahylan
Advisor
Advisor
Accepted solution

Hi!

 

If you want to space out colums you'll need to feed the cs flag in the following way:

#One specified space
cs = [numberOfColumn,Spacing]
#Multiple specified spaces 
cs = [[numberOfColumn,Spacing],[numberOfColumn,Spacing],[numberOfColumn,Spacing],[numberOfColumn,Spacing]]

 

so in an example with a rowColumLayout that has 3 columns that you want to be spaced by 400 pixels:

import maya.cmds as cmds

cmds.rowColumnLayout( numberOfColumns=3, cs = [[1,400],[2,400],[3,400]])

Now, this gives you the ability to do custom spacings for each column, but sadly as far as I know there isn't a way to just have the columns spaced out evenly without feeding a value for each one.

 

I hoep it helps!

0 Likes