Re: [Tutor] events and popup menus

2012-05-05 Thread Chris Hare
Thanks Peter - I finally got back to working on this while my dog was having a panic attack from a thunderstorm about 430 AM. :-) She is asleep as my feet. Anyway, great example and it showed me exactly what i needed to do, AND what I was doing wrong. I appreciate your help! On May 3, 201

Re: [Tutor] events and popup menus

2012-05-03 Thread Peter Otten
Chris Hare wrote: > I have four images in a frame. I want to pop up a menu when the user > right clicks on an image, and when they choose an option from the menu, > execute the action. > > I can create the popup menu, and bind it to the image. However, what I > can't figure out is how to detect

Re: [Tutor] events and popup menus

2012-05-02 Thread Alan Gauld
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

Re: [Tutor] events and popup menus

2012-05-02 Thread Chris Hare
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, how do I figure out the widget's coordinates in order to figure out which of the four widgets the mouse was over when the user clicked a butt

Re: [Tutor] events and popup menus

2012-05-01 Thread Alan Gauld
On 01/05/12 21:59, Chris Hare wrote: ... what I can't figure out is how to detect in the popup menu code > which image fired the event def do_popup(self,event): The event argument has various attributes. For a mouse click it should include the screen coordinates. You can use those to de

Re: [Tutor] events and popup menus

2012-05-01 Thread Prasad, Ramit
> I have four images in a frame. I want to pop up a menu when the user > right clicks on an image, and when they choose an option from the menu, > execute the action. > > I can create the popup menu, and bind it to the image. However, what I > can't figure out is how to detect in the popup menu

[Tutor] events and popup menus

2012-05-01 Thread Chris Hare
I have four images in a frame. I want to pop up a menu when the user right clicks on an image, and when they choose an option from the menu, execute the action. I can create the popup menu, and bind it to the image. However, what I can't figure out is how to detect in the popup menu code w