Sep-14-2022, 03:48 AM
Got my first menu working based on this code from the web. Problem is the menu commands disappear when a menu item is selected. Is there some way to keep it visible? Thanks
from tkinter import * def donothing(): filewin = Toplevel(root) button = Button(filewin, text="Do nothing button") button.pack() root = Tk() menubar = Menu(root) filemenu = Menu(menubar, tearoff=0) filemenu.add_command(label="New", command=donothing) filemenu.add_command(label="Open", command=donothing) menubar.add_cascade(label="File", menu=filemenu) root.config(menu=menubar) root.mainloop()