You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

test.py 292B

1234567891011121314151617
  1. try:
  2. from Tkinter import *
  3. except ImportError:
  4. from tkinter import *
  5. def myClick(string):
  6. myLabel = Label(root, text=string)
  7. myLabel.pack()
  8. root = Tk()
  9. myButton = Button(root, text="Click me", command=lambda: myClick("test"), bg="blue")
  10. myButton.pack()
  11. root.mainloop()