Hello Guys,
I have a quick question, I am populating UI with bunch of images using a for loop. When I query the lable it gives me the name for the last image. I can't seem to find a way to query the info on any other selected image. I understand the reason why I am getting the last for loop entry but what would be the correct way of doing it.
here is the piece of code I am using.
any help will be awesome.
########################################################################
def click(*args):
ans = cmds.iconTextButton(btnIcn, label =True, q = True)
print (ans)
window = cmds.window(title='imageTextButtonTest')
layout = cmds.columnLayout()
for i in range(4):
btn = ('icon_' + str(i))
btnIcn = cmds.iconTextButton(label = btn, style='iconAndTextVertical',c = click, image=r'C:\Users\nitin\Desktop\icon\201577.png',sic = True, h=150,w=150)
cmds.showWindow(window)
########################################################################