6

When creating a Menu in Tkinter on Mac OSX, the very first submenu is labeled "Python". Is there a way to remove this so that the only submenus are the ones that I have created or does that submenu always exist no matter what?

Here is how I'm creating my menu

root = self.winfo_toplevel()
self.menu = Menu(root)
root['menu'] = self.menu
self.sub_menu = Menu(self.menu)
self.menu.add_cascade(label='My Program', menu=self.sub_menu)
self.sub_menu.add_command(label='Quit', command=self.quit)
1
  • Version of Python and TKinter? OS shouldn't affect it afaik. Commented Jan 2, 2012 at 0:28

1 Answer 1

5

The only way I've been able to rename the first Menu title is to compile the python to an application. I did this using py2app.

I have an example app you can see here:

https://bitbucket.org/jgrigonis/mathfacts/overview

The key code is in this file:

https://bitbucket.org/jgrigonis/mathfacts/src/b994b6225743/setupmac.py

Sign up to request clarification or add additional context in comments.

1 Comment

Great! I didn't know about py2app. Thank you!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.