Re: How to place menu on the bottom
- From: qxyuestc@xxxxxxxx
- Date: Sat, 30 Aug 2008 03:52:45 -0700 (PDT)
On Aug 30, 6:04 pm, Fredrik Lundh <fred...@xxxxxxxxxxxxxx> wrote:
qxyue...@xxxxxxxx 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>
step1: I first create a widget "menuFrame" which is belong to the
rootWin
....menuFrame = Frame(self.rootWin)
step2: then I put the widget to the bottom of the rootWin
....menuFrame.pack(side=BOTTOM, fill=X)
step3: I create a menu belong to the menuFrame.
....menuBar = Menu(menuFrame, tearoff=1)
since menuFrame should be placed to the bottom, so does the menuBar in
my opinion. What the problem is?
.
- Follow-Ups:
- Re: How to place menu on the bottom
- From: Fredrik Lundh
- Re: How to place menu on the bottom
- References:
- Re: How to place menu on the bottom
- From: Fredrik Lundh
- Re: How to place menu on the bottom
- Prev by Date: Re: Date Comparison and Manipulation Functions?
- Next by Date: Re: How to check is something is a list or a dictionary or a string?
- Previous by thread: Re: How to place menu on the bottom
- Next by thread: Re: How to place menu on the bottom
- Index(es):