Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from tkinter import *
- root = Tk()
- def on_click(event):
- print('Hello!')
- button = Button(width = 3, height = 3, bg = 'skyblue')
- button.grid(row = 0, column = 0)
- button.bind('<Button-1>', on_click)
- root.mainloop()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement