更新时间:2023-12-05 18:03:16
我不喜欢使用基于文本的命令.相反,您可以分配回调.尝试的一种选择是使用 lambda(因为您想传递自己的参数):
I prefer not to use text-based commands. Instead, you can assign callbacks. One option to try is using lambda (since you want to pass your own argument):
cmds.button(label='Click me', command=lambda x:printTxtField(whatUSay))