I have the following code, what I'm trying to do is change the color the the menubar to be the same as my window. I have tried what you see below, adding to bg="#20232A"
to menubar
but this seems to have no affect..
My Question: The below image is the window (albeit a snippet of the window), it showcases both the menubar and background. I want the menubar to be the same color as the background seen below, how can I achieve this?
from tkinter import *
config = {"title":"Editor", "version":"[Version: 0.1]"}
window = Tk()
window.title(config["title"] + " " +config["version"])
window.config(bg="#20232A")
window.state('zoomed')
def Start():
menubar = Menu(window, borderwidth=0, bg="#20232A") # Tried adding background to this, but it doesent work
filemenu = Menu(menubar, tearoff=0)
filemenu.add_command(label="Open")
filemenu.add_command(label="Save")
menubar.add_cascade(label="File", menu=filemenu)
window.config(menu=menubar)
Start()
window.mainloop()
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…