Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from tkinter import *
- # Creates the window and the window title
- window = Tk()
- window.title("Whomst'd've'ly'yaint'nt'ed'ies's'y'es made this GUI")
- def bye():
- my_label.config(text = "Time to modify our geometrical position in the observable universe.")
- def option_granted():
- happy = PhotoImage(file = "satisfied.png")
- def angery():
- rattled = PhotoImage(file = "sad.jpeg")
- my_First_Label = Label(window, text = "Henlo frend")
- my_First_Label.grid(row = 0, column = 5)
- my_Second_Label = Label(window, text = "Do you have bepis?")
- my_Second_Label.grid(row = 1, column = 0)
- my_First_button = Button(window, text = "Yas", command = option_granted)
- my_First_button.grid(row = 2, column = 2)
- my_Second_button = Button(window, text = "No", command = angery)
- my_Second_button.grid(row = 2, column = 8)
- window.mainloop()
Add Comment
Please, Sign In to add comment