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

Phlip phlip_cpp at my-deja.com
Wed Apr 11 14:30:49 EDT 2001


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.

-- 
  Phlip                          phlip_cpp at my-deja.com
============== http://phlip.webjump.com ==============
  --  All sensors report Patti having a very good time  --



More information about the Python-list mailing list