python - Maya scripting: Issue when creating user interfaces (rows and columns) -


i create user ui has item distribution this:

enter image description here

on large rectangle slide bar. problem cannot work. try specify 2 different layouts in same window , maya goes funny telling me there many children or this. here put have far:

cmds.window(windowid, title='towers of hanoi', sizeable=false, resizetofitchildren=true) cmds.rowcolumnlayout(numberofcolumns=2, columnwidth=[(1,90),(2,80)], columnoffset=[(1,'right',5),(2,'right',5)])  cmds.text(label='num. of disks:') cmds.separator( h=10, style='none' )  cmds.separator( h=5, style='none' ) cmds.separator( h=5, style='none' )  # do here? disknumuifield = cmds.intscrollbar(min=2, max=12, value=0, step=1, largestep=2) cmds.separator( h=10, style='none' )  # thing above problem is?  cmds.separator( h=5, style='none' ) cmds.separator( h=5, style='none' )  cmds.button(label='place disks', width=75, command=blablabla()) cmds.button(label='clear all', width=75, command=blablabla())  cmds.separator( h=5, style='none' ) cmds.separator( h=5, style='none' )  cmds.button(label='solve it!', width=75, command=blablabla()) cmds.button(label='exit', width=75, command=blablabla())  cmds.separator( h=5, style='none' ) cmds.separator( h=5, style='none' )  cmds.showwindow() 

i don't want happen

thanks taking @ it.

using columnlayout nested rowlayouts:

enter image description here

cmds.window(windowid, title='towers of hanoi', sizeable=false, resizetofitchildren=true) cmds.columnlayout(columnattach=('both', 5), columnwidth=200)  cmds.text(label='num. of disks:')  disknumuifield = cmds.intscrollbar(min=2, max=12, value=2, step=1, largestep=2)  cmds.rowlayout(numberofcolumns=2, columnwidth2=(90, 80))  cmds.button(label='place disks', width=75, command=blablabla) cmds.button(label='clear all', width=75, command=blablabla)  cmds.setparent('..')  cmds.rowlayout(numberofcolumns=2, columnwidth2=(90, 80))  cmds.button(label='solve it!', width=75, command=blablabla) cmds.button(label='exit', width=75, command=blablabla) cmds.showwindow() 

nb: button commands had parentheses. calls function before building button. need remove parentheses in order function called on click.


Comments

Popular posts from this blog

php - regexp cyrillic filename not matches -

c# - OpenXML hanging while writing elements -

sql - Select Query has unexpected multiple records (MS Access) -