On 02/05/12 12:33, Chris Hare wrote:
Using the event coordinates to figure out which widget was clicked sounds like 
a good idea.
> So, since the user might have moved the window on the screen,

Sorry I wasn't precise enough, I believe the mouse coordinates are the relative coordinates in your window. Not the full screen. So if you used the placer its whatever you placed it at. Otherwise you can query each widget for their current location/size.

Or there may be an included() method that tells you if the point is included in the widgets area. I can't recall how Tkinter does it and I'm seen GUIs do it both ways... Sorry, not near a Tkinter reference right now!

I think its in the "winfo" methods somewhere...


--
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/

_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to