|
same issue in mel.
its not that python doesn’t “understand” ‘left’, ‘right’ etc as its accepting the values, but just not applying them.
same applies in 2012, it’s never really bothered me tbh, anything i’m picky about for a gui i’d create in qt anyway, and for a confirm dialog as long as i got the message across it didn’t matter.
as for the example you provided, it does work, but the script is wrong. When you use a radioButtonGrp the first instance is the label, which may have been correctly used;
columnAttach=(1,"right",0)
as (im assuming) they wanted the label to align right, then the columnWidth is only being applied on the label, first and last radioButton, so the second button’s width becomes default (textWidth) which makes it look wrong.
what it wanted (im assuming again) was actually this
import maya.cmds as cm if cm.window("windowTemp", exists=True):
cm.deleteUI("windowTemp")
windowWidth = 300
windowHeight =400
cm.window("windowTemp", width=windowWidth, height=windowHeight, title="Title", sizeable=False )
cm.scrollLayout(hst=0) topClmnLaout = cm.columnLayout(adj=True, rs=3)
scrollWidth = windowWidth - 30
textWidth = 80
columnWidth = 100
cm.rowColumnLayout(nc=4, columnAttach=(1,"left",0), columnWidth=[(1, columnWidth),(2, columnWidth),(3, columnWidth),(4, columnWidth)])
cm.text(label="XYZ: ") cm.radioCollection()
cm.radioButton("XY", label="XY", select=False) cm.radioButton("YZ", label="YZ", select=True) cm.radioButton("XZ", label="XZ", select=False)
cm.setParent(topClmnLaout) cm.separator()
cm.showWindow("windowTemp")
which states the label and all 3 radioButtons width’s.
//**EDIT
my silly mistake claiming
When you use a radioButtonGrp the first instance is the label,
what i mean to say was, “as your using text label plus the radio button group in the same layout”
Lee Dunham | Character TD
ldunham.blogspot.com
|