Programmatically posting tkinter menus

Dan Greenblatt dan.greenblatt at gmail.com
Wed Aug 11 02:33:42 CEST 2004


I know this can be done for context menus with the 'post' command....

What I'm trying to do, though, is programmatically post non-contextual
menus (i.e. menus that exist on a horizontal menu bar at the top of my
application window) in the correct place.

So if I have five different menus (i guess these are menubuttons?)
placed horizontally on my menu bar, and the third one is 'Actions',
what is the best way to determine the x and y coordinates of these
menu items, so that i can supply these coordinates to the post command
and make the Actions menu  pop up in the same place as if the user
selected the 'Actions' menubutton from the menu bar???

I'm sure there's some Tkinter trickery involved, I just don't know how
to get location information for these individual menubuttons as
opposed to the containing menu as a whole.

Thanks in advance,
Dan



More information about the Python-list mailing list