I have two canvases (elements):
self.canvas1
self.canvas2
I want them to do something()
when the mouse hover over the canvas.
So I hook it up using the bind('<Enter>')
:
self.canvas1.bind('<Enter>', something)
self.canvas2.bind('<Enter>', something)
In the something()
it will try to configure the canvas to red background color so:
def something(event):
canvas.configure(background='red')
The tricky part is, how does the function something
know which canvas it suppose to change its background color to?