mariang_09

Untitled

Nov 13th, 2017
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.83 KB | None | 0 0
  1. from tkinter import *
  2.  
  3. # Creates the window and the window title
  4. window = Tk()
  5. window.title("Whomst'd've'ly'yaint'nt'ed'ies's'y'es made this GUI")
  6.  
  7. def bye():
  8.     my_label.config(text = "Time to modify our geometrical position in the observable universe.")
  9.  
  10. def option_granted():
  11.     happy = PhotoImage(file = "satisfied.png")
  12.  
  13. def angery():
  14.     rattled = PhotoImage(file = "sad.jpeg")
  15.  
  16.  
  17. my_First_Label = Label(window, text = "Henlo frend")
  18. my_First_Label.grid(row = 0, column = 5)
  19.  
  20. my_Second_Label = Label(window, text = "Do you have bepis?")
  21. my_Second_Label.grid(row = 1, column = 0)
  22.  
  23. my_First_button = Button(window, text = "Yas", command = option_granted)
  24. my_First_button.grid(row = 2, column = 2)
  25.  
  26. my_Second_button = Button(window, text = "No", command = angery)
  27. my_Second_button.grid(row = 2, column = 8)
  28.  
  29.  
  30.  
  31. window.mainloop()
Add Comment
Please, Sign In to add comment