Hello everyone!

Just discovered the trick to bind and distinguish specific items on
the canvas in Tkinter :)

According to 'Programming python' from Mark Lutz, page 541 it is
possible with the widget.find_closest method to bind a specific item
on a canvas. Just what I've been looking for! So I can change my
formerly posted snippet to:

def mouseDown(self, event):
        # remember where the mouse went down
        self.lastx = event.x
        self.lasty = event.y
        print event.widget.find_closest(event.x, event.y)     #  <--
this does the trick

Tested this out and it works very well!

Hope this will others pointing in the right direction!

With regards,
- Ben
_______________________________________________
Tkinter-discuss mailing list
Tkinter-discuss@python.org
http://mail.python.org/mailman/listinfo/tkinter-discuss

Reply via email to