Python Forum

Full Version: tkinter menubar not showing on mac ventura
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
i bought a macbook air m2, ventura os 13.0.1, python 3.11. The tkinter menubar function does not produce the menubar line.
This is the code:

from tkinter import *
top = Tk()
def hello():
     print("hello!")
# create a toplevel menu
menubar = Menu(top)
menubar.add_command(label="Hello!", command=hello)
menubar.add_command(label="Quit!", command=top.quit)
# display the menu
top.config(menu=menubar)
top.mainloop()
On windows 11, python 3 the code works perfectly.
In the forums I have not found any indications on this problem.
Does the following link help (scroll down to Platform Menus)
https://tkdocs.com/tutorial/menus.html

Also previously asked on the forum
[Tkinter] No menu bar in window