Detecting (draw) items on Canvas (widget)
Question: I have a Canvas (c1) and have created (drawn) a rectangle item on c1. How can I find out that at an xy location I'm over the canvas OR over the rectangle (the latter, of course, is over the Canvas too)? Tried with various "tag"-s, but did not work.
On Wed, Nov 26, 2008 at 5:23 PM, Gabor Kalman <Kalman_G@msn.com> wrote:
Question:
I have a Canvas (c1) and have created (drawn) a rectangle item on c1. How can I find out that at an xy location I'm over the canvas OR over the rectangle (the latter, of course, is over the Canvas too)? Tried with various "tag"-s, but did not work.
What do you mean by finding out if you are over the canvas ? As soon as the mouse pointer enters the canvas, you are over the canvas. For the second part of the question check this: http://mail.python.org/pipermail/tkinter-discuss/2008-November/001737.html as it is a very similar question
_______________________________________________ Tkinter-discuss mailing list Tkinter-discuss@python.org http://mail.python.org/mailman/listinfo/tkinter-discuss
-- -- Guilherme H. Polo Goncalves
participants (2)
-
Gabor Kalman -
Guilherme Polo