I'm trying to learn about python GUI's but I can't figure out how to bind stuff.
from tkinter import *
root = Tk()
def leftClick(event):
print("Left click")
frame = Frame(root,width=300,height=250).pack()
frame.bind("<Button-1>", leftClick)
root.mainloop()
but...
Traceback (most recent call last):
File "gui2.py", line 8, in <module>
frame.bind("<Button-1>", leftClick)
AttributeError: 'NoneType' object has no attribute 'bind'