How to place menu on the bottom

Fredrik Lundh fredrik at pythonware.com
Sat Aug 30 12:04:26 CEST 2008


qxyuestc at yahoo.cn wrote:

>         self.rootWin.config(menu=menuBar)

> I want to place the menu on the bottom (menuFrame.pack(side=BOTTOM,
> fill=X)). But it does not work. Why?

menubars that are configured via the window menu option are rendered by 
the underlying window system.

to create a stand-alone menu bar, create a frame and pack or grid it 
where you want it, then add Menubutton widgets to it, and attach your 
pulldown menus to those buttons.

the following wrapper supports both menu styles; look at the "else" 
clauses in the various "if use_native_menus" statements for code samples:

http://svn.effbot.org/public/stuff/sandbox/tkinter/tkMenu.py

</F>




More information about the Python-list mailing list