A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-list/2001-April/077316.html below:

Tkinter Context Menus select their first item even if you don't want them to

Tkinter Context Menus select their first item even if you don't want them to Tkinter Context Menus select their first item even if you don't want them toRobert Roy rjroy at takingcontrol.com
Wed Apr 11 21:06:43 EDT 2001
On Wed, 11 Apr 2001 11:30:49 -0700, Phlip <phlip_cpp at my-deja.com>
wrote:

>Hyp Ton:
>
>Try this code... You can right-click on the canvas to make the menu 
>pop up.
>
>http://mail.python.org/pipermail/python-list/1999-November/015485.html
>
>However, if you make the first menu item call a command that calls 
>'sys.exit(0)', merely summoning the menu with <Button-3> croaks the program.
>
>Real Context Menus display and then await a further input. This means you 
>can back out of an action instead of comiting it. Platform is LinuxPpc.
>
>My current work-around is to make the first item do nothing, but I'd 
>obviously prefer a real fix.
>


Can you post a small script that does what you are talking about? I
just tried adding sys.exit(0) to the callback in the code you
reference and it works just fine.

Bob



More information about the Python-list mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4