Tkinter: populating Mac Help menu?

Eric Brunel eric_brunel at
Wed Oct 11 11:22:45 CEST 2006

On Tue, 10 Oct 2006 14:29:46 +0200, Edward K. Ream <edreamleo at>  
> So given x (a string), how does one create a widget whose name is  
> ''
> % x ?  This is a can of corn in Tk, but nothing comes to mind looking at  
> the
> Tkinter source code.

Use the 'name' keyword when creating the menu itself:

 from Tkinter import *

root = Tk()

mb = Menu(root)

## Normal menu
fm = Menu(mb)
fm.add_command(label='Quit', command=root.quit)
mb.add_cascade(label='File', menu=fm)

## Help menu with a specific name
hm = Menu(mb, name='help')
mb.add_cascade(label='Help', menu=hm)


I didn't test it on MacOS-X, but the same trick should be used when  
creating help menus on Unix (this menu is supposed to appear at the right  
of the menubar according to Motif conventions).

python -c "print ''.join([chr(154 - ord(c)) for c in  

More information about the Python-list mailing list