1

So, I've just finished my first application with Python 3. I was lucky enough to succeed in building a standalone file with py2app, with an icon and all. However, the standalone application has many menu bar items that are completely redundant. I would rather have only two things in the menu bar - the title of the application and a "Quit" command in a drop down menu. (Even "quit" command is redundant as it is located elsewhere in the GUI that I created with tkinter.)

Is there a way to omit the menu bar when building with py2app? I'm on OS X, Python 3.

1 Answer 1

1

By trial and error, I found a solution to my question myself. It seems that unless a tkinter menubar is created by the programmer, there will be one with default items anyhow.

So creating a blank menubar myself - without cascading any pull-down menus such as "File" - made the pointless, non-working pull-downs menus disappear. Perhaps it's not the most sophisticated solution, but it worked for me. Here's the code I added:

menubar = Tk.Menu(root) 

And before the root.mainloop() command:

root.config(menu=menubar) 
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.