From: Dean N. W. <wil...@ll...> - 2005-10-26 14:02:41
|
Hi Eric, I've tried your complete menu example below. I can add to the menu, but I cannot change the first menu name from "python" to "MyApp_name". The full source code is as follows: import Tkinter root=Tkinter.Tk() myMenuBar = Tkinter.Menu( root ) myApplicationMenu = Tkinter.Menu(myMenuBar, name="apple") myMenuBar.add_cascade(label="My application", menu=myApplicationMenu) root.config(menu=myApplicationMenu) If you select the "tk" window, you will see that the Apple main menu is still "python". The "File" and "Edit" menus are removed and I can add additional menus if I desire. But I cannot replace the "python" name with "MyApp_name". -Dean myApplicationMenu = Menu(myMenuBar, name='apple') myMenuBar.add_cascade(label="My application", menu=myApplicationMenu) pmw...@li... wrote: >Send Pmw-general mailing list submissions to > pmw...@li... > >To subscribe or unsubscribe via the World Wide Web, visit > https://lists.sourceforge.net/lists/listinfo/pmw-general >or, via email, send a message with subject or body 'help' to > pmw...@li... > >You can reach the person managing the list at > pmw...@li... > >When replying, please edit your Subject line so it is more specific >than "Re: Contents of Pmw-general digest..." > > >Today's Topics: > > 1. Re: Tcl/Tk Aqua (Eric Brunel) > >--__--__-- > >Message: 1 >Date: Tue, 25 Oct 2005 08:18:04 +0100 >From: Eric Brunel <eri...@pr...> >To: pmw...@li... >Reply-To: su...@pr... >Organization: PragmaDev >Subject: [Pmw-general] Re: Tcl/Tk Aqua > > > >>Date: Mon, 24 Oct 2005 07:28:53 -0700 >> From: "Dean N. Williams" <wil...@ll...> >>To: pmw...@li... >>Subject: [Pmw-general] Re: Pmw-general digest, Vol 1 #94 - 1 msg >> >>Hi Eric, >> >>I attemped the following below, but there is no attribute "name". When I run >>the below, I get "unknown option "-name". Is there something that I'm missing >>from your example below? >> >> > >Sorry fot that: my mistake. The 'name' option should be passed to the Menu >constructor, not to the add_cascade. So here is the working example: > >myApplicationMenu = Menu(myMenuBar, name='apple') >myMenuBar.add_cascade(label="My application", menu=myApplicationMenu) > >HTH >-- > - Eric Brunel - > > > > > >--__--__-- > >_______________________________________________ >Pmw-general mailing list >Pmw...@li... >https://lists.sourceforge.net/lists/listinfo/pmw-general > > >End of Pmw-general Digest > > > |