Hi all, I had frequent use of the redistribute method in pymel's formLayout and horizontalLayout. In some cases i want the ratio of the last child to be fixed ( 0 ) . Consider an example below:
################### from pymel.core import * win = window() topForm = formLayout(parent=win) text1 = text(parent=topForm,h=10,label='list') TSL1 = textScrollList(parent=topForm) button1 = button(parent=topForm,h=20) topForm.redistribute(0,2,0) showWindow(win) ################### the problem with the code above is that button1 will not appear because the last ratio is 0. My current workaround is to add invisible dummy item with ratio 1 (i.e. text(parent=topForm,label='')) below the last child to force button1 to appear, but most of the time the final redistribute effect is not what I wish to achieve( the last dummy item will also be resized whenever the window is resized). Is there a direct solution to this problem, or other "cheat" to make it work as expected ? Hope I am clear, Thanks :) Jefri -- http://groups.google.com/group/python_inside_maya
