Menu
Menu
import shutil
import random
import functools
import time
import threading
from tkinter import colorchooser
from tkinter import *
from tkinter import filedialog
def change_bg_color():
color=colorchooser.askcolor()
bg_color=color[1]
window.config(bg=bg_color)
window=Tk()
window.geometry('500x500')
saveImage=PhotoImage(file='D:\\Download\\floppy.png')
openImage=PhotoImage(file='D:\\Download\\openimage.png')
text=Text(window)
text.pack()
menuBar=Menu(window)
window.config(menu=menuBar)
fileMenu=Menu(menuBar,tearoff=False)
menuBar.add_cascade(label="File",menu=fileMenu)
editMenu=Menu(menuBar,tearoff=False)
menuBar.add_cascade(label="Edit",menu=editMenu)
fileMenu.add_command(label="Open",image=openImage,compound=LEFT)
fileMenu.add_command(label="Save",image=saveImage,compound=LEFT)
fileMenu.add_separator()
fileMenu.add_command(label="Exit",command=window.quit)
editMenu.add_command(label="Change bg color",command=change_bg_color)
window.mainloop()