15 Jun 2012 13:07
a couple of mac menu problems
Mark Summerfield <list <at> qtrac.plus.com>
2012-06-15 11:07:38 GMT
2012-06-15 11:07:38 GMT
Hi,
I'm trying to develop a cross-platform Tkinter app.
Here's a bit of code used to create the Help menu:
if MAC:
self.master.createcommand("tkAboutDialog", self.about_action)
self.master.createcommand("::tk::mac::ShowHelp",
self.help_action)
helpMenu = tk.Menu(self.menubar, name="help")
helpMenu.add_command(label="Help", underline=0,
command=self.help_action)
if not MAC:
helpMenu.add_command(label="About", underline=0,
command=self.about_action)
self.menubar.add_cascade(label="Help", underline=0,
menu=helpMenu)
I end up with these menus:
ActivePython3.2
About ActivePython3.2 # correctly invokes my about action
...
Help
Search # some apple-specific thing that just appears
ActivePython3.2 Help # invokes my help action
Help # invokes my help action
(Continue reading)
RSS Feed