I've seen that it is possible to bind a label to a function so that if it's clicked, it does something. How can this be done using canvas.create_image method? When I tried it says that AttributeError: 'int' object has no attribute 'bind'. How is an image an integer?
canvas.create_image
AttributeError: 'int' object has no attribute 'bind'
Use the canvas.tag_bind method.
img = canvas.create_image() canvas.tag_bind(img, '<Button-1>', callback)
1.4m articles
1.4m replys
5 comments
57.0k users