from tkinter import * from tkinter.ttk import * from time import strftime # creating tkinter window my_window = Tk() my_window.geometry('500x300') my_window.title('Menu操作') # Creating Menubar menubar = Menu(my_window) # Adding File Menu and commands filemenu = Menu(menubar, tearoff=0) menubar.add_cascade(label='File', menu=filemenu) filemenu.add_command(label='New File', command=None) filemenu.add_command(label='Open...', command=None) filemenu.add_command(label='Save', command=None) filemenu.add_separator() filemenu.add_command(label='Exit', command=my_window.destroy) # Adding Edit Menu and commands editmenu = Menu(menubar, tearoff=0) menubar.add_cascade(label='Edit', menu=editmenu) editmenu.add_command(label='Cut', command=None) editmenu.add_command(label='Copy', command=None) editmenu.add_command(label='Paste', command=None) editmenu.add_command(label='Select All', command=None) editmenu....