Maya cmds: I have a basic grid and I want to remove an item, but the grid doesn't update. So the removed item keeps taking up space. How can I make the gridLayout refresh or re-align its items?
import maya.cmds as cmds
def change(*args):
cmds.iconTextCheckBox('two', edit=True, visible=False)
window = cmds.window()
cmds.gridLayout()
cmds.iconTextCheckBox('one', style='textOnly', label='item')
cmds.iconTextCheckBox('two', style='textOnly', label='item')
cmds.iconTextCheckBox('three', style='textOnly', label='item')
cmds.button(label='GO', command=change)
cmds.showWindow(window)

