I am using Python 3.5, Tkinter 8.6 on a Windows 7 platform. For the simple code below, I keep getting the following error message...
button2.bind("<Button-1>",PrintAddress)
AttributeError: 'NoneType' object has no attribute 'bind'
CODE
from tkinter import *
root = Tk()
root.geometry('200x200')
def PrintName():
print("My name is ..........")
def PrintAddress(event):
print("W223 N2257...........")
button1 = Button(root,text = 'Print Name', command=PrintName).grid(row = 0)
button2 = Button(root,text = 'Print Address').grid(row = 0,column = 2)
button2.bind("<Button-1>",PrintAddress)
root.mainloop()