TAG | Tkinter
411 viewsHere is a crude example of how to pass a parameter to the command of your Tkinter Button.
import Tkinter
def command(text):
ButtonText.set(text)
root = Tkinter.Tk()
ButtonText = Tkinter.StringVar()
ButtonText.set("Do Callback")
Tkinter.Button(root, textvariable=ButtonText, command=lambda x="Hello World!": command(x)).pack()
root.mainloop()
