SHARE
TWEET

Untitled

a guest Feb 22nd, 2019 58 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. from tkinter import *
  2.  
  3. root = Tk()
  4.  
  5. def handler(event):
  6.     print('clicked at', event.x, event.y)
  7.  
  8. frame = Frame(root, width=100, height=100)
  9. label = Label(frame, text="Label")
  10. frame.bind('<Button-1>', handler)
  11. frame.pack()
  12. label.pack(side=TOP)
  13.  
  14. root.mainloop()
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top