Tkinter: closing a popup menu by clicking elsewhere
Peter Otten
__peter__ at web.de
Thu Feb 26 06:19:01 EST 2004
More information about the Python-list mailing list
Thu Feb 26 06:19:01 EST 2004
- Previous message (by thread): Buglet in CVS 040225
- Next message (by thread): Driver for 4th Dimension?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
How can I close a popup menu in Tkinter by clicking elsewhere on the
toplevel window underneath?
I tried popup.grab_set() but this causes the popup to close immediately.
An alternative would be
def hidepopup(event=None):
popup.unpost()
return "break"
root.bind_all("<Button-1>", hidepopup)
but I'd then need a way to make sure that other bindings in children are not
processed or only processed after hidepopup.
Any hints welcome,
Peter
- Previous message (by thread): Buglet in CVS 040225
- Next message (by thread): Driver for 4th Dimension?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list