How to align Button to right in maya python

How to align Button to right in maya python

Anonymous
Not applicable
4,030 Views
2 Replies
Message 1 of 3

How to align Button to right in maya python

Anonymous
Not applicable

I want to align button to the right and create checkbox to the left.
I want to display button and checkbox in one line .Thank you

 

Code:

import maya.cmds as cmds

cmds.window( width=200 )
cmds.columnLayout( adjustableColumn=False )
cmds.button( label='Submit Job',width=130,align='right')
cmds.checkBox(label='Scout Job')
cmds.showWindow()

 

Output

 

Ungrgtitled.png

Expected Output

 

dveddge.png

 

0 Likes
Accepted solutions (1)
4,031 Views
2 Replies
Replies (2)
Message 2 of 3

rajasekaransurjen
Collaborator
Collaborator
Accepted solution

This will work

 

import maya.cmds as cmds

cmds.window( width=200 )
cmds.rowLayout( numberOfColumns=2 )
cmds.checkBox(label='Scout Job')
cmds.button( label='Submit Job',width=130,align='right')
cmds.showWindow()

Message 3 of 3

The-Digital-Shaman
Advocate
Advocate

Is it possible to align label within a button using MEL/Maya Commands?
Autodesk's UI menu has alignment to left and added margin.