Hi I am learning about creating custom UI for Maya using Python. I am trying to achieve few things which I am unable to do. I searched around but couldn't find my answers.
import maya.cmds as cmds
def main():
cmds.window(title='Test Window')
cmds.columnLayout()
cmds.textFieldGrp('obj1', label='Name', text ="Please enter your name")
cmds.textFieldGrp('obj2', label='Address', text = "Please enter your address")
cmds.rowLayout(nc=3)
cmds.button(label="Lock", width=100, c='disable_texts()')
cmds.button(label="Edit", width=100, c='change_texts()')
cmds.button(label="Reset", width=100, c='default()')
cmds.showWindow()
def disable_texts():
# disable the text fields
def change_texts():
# enable the text fields
def default():
# change the text fields back to default ie like above