Community
Maya Programming
Welcome to Autodesk’s Maya Forums. Share your knowledge, ask questions, and explore popular Maya SDK topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to align Button to right in maya python

2 REPLIES 2
SOLVED
Reply
Message 1 of 3
Anonymous
3531 Views, 2 Replies

How to align Button to right in maya python

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

 

Tags (3)
2 REPLIES 2
Message 2 of 3
rajasekaransurjen
in reply to: Anonymous

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
in reply to: Anonymous

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

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report