[Tkinter-discuss] a couple of mac menu problems

Kevin Walzer kw at codebykevin.com
Sat Jun 16 03:17:23 CEST 2012


On 6/15/12 2:06 PM, Lynn Oliver wrote:
> While I was able to figure out the preferences menu by looking at the idlelib sources, I couldn't get the application/about menu to work.

Here's how I get the correct application dialog in the 'about myapp" menu:

self.createcommand('tkAboutDialog', self.aboutProgram)
     #dialog for 'about program'
     def aboutProgram(self):
         self.tk.call('tk::mac::standardAboutPanel')
(You can substitute any Python bits here that you want--the key is to 
map the 'tkAboutDialog' command to some kind of Python function or method.)

-- 
Kevin Walzer
Code by Kevin
http://www.codebykevin.com


More information about the Tkinter-discuss mailing list