Tkinter: populating Mac Help menu?

Edward K. Ream edreamleo at charter.net
Tue Oct 10 08:29:46 EDT 2006


Hello all,



Creating a 'Help' menu 'by hand' on the Mac does not work, or rather, it 
creates a *second* Help menu.



There are hints about how to do this at:



http://tkinter.unpythonic.net/wiki/Widgets/Menu



but so far those hints have not been enough :-) The following statements are 
the result of several happy hours experimenting with dir(obj) for several 
objects obj related to menus.  (Jeeze, I love Python, but you knew that :-)



The url above suggests that the 'official' Mac menu is named x.help, where x 
is the Tk name (a string) of the menubar.  If menubar is the Tkinter menubar 
widget, then I assume that x = menubar._w.



So given x (a string), how does one create a widget whose name is '%s.help' 
% x ?  This is a can of corn in Tk, but nothing comes to mind looking at the 
Tkinter source code.



If my app does *not* create a help menu, then even long after the Mac 
menubar is created, and the official (empty) Help menu is visible, 
menubar.children does *not* contain an entry for the official Mac Help menu. 
Thus, there appears to be no way to populate the official Help menu after 
letting Tkinter create the Help menu.  Naturally, I could be wrong :-)



Thanks for any help you can provide.


Edward
--------------------------------------------------------------------
Edward K. Ream   email:  edreamleo at charter.net
Leo: http://webpages.charter.net/edreamleo/front.html
--------------------------------------------------------------------





More information about the Python-list mailing list