Re: Change menubar color?
Alejandro Autalan <[email protected]>
| Newsgroups | gmane.comp.python.tkinter |
|---|---|
| Message-ID | <CAMicNw1E=nMCMGKXu2n2MQvZtBsMKgJcCJOPWvPVs1RQ4T9FgQ@mail.gmail.com> |
2014-10-27 17:10 GMT-03:00 Juan Christian <[email protected]>: > I have this simple code: > > from tkinter import * > > root = Tk() > root.title("Steam Trader") > root.minsize(500, 800) > root.maxsize(500, 0) > > menubar = Menu(root) > filemenu = Menu(menubar, tearoff=0) > filemenu.add_command(label="Open", command=None) > filemenu.add_command(label="Save", command=None) > menubar.add_cascade(label="File", menu=filemenu) > > root.config(bg='#2A2C2B', menu=menubar) > root.mainloop() > > > And I want to change the menu color, is it possible? > > [image: Inline image 1] > > _______________________________________________ > Tkinter-discuss mailing list > [email protected] > https://mail.python.org/mailman/listinfo/tkinter-discuss > > Hello, yes it is posible: from tkinter import * root = Tk() root.title("Steam Trader") root.minsize(500, 800) root.maxsize(500, 0) menubar = Menu(root, background='#000099', foreground='white', activebackground='#004c99', activeforeground='white') filemenu = Menu(menubar, tearoff=0, background='#000099', foreground='white', activebackground='#004c99', activeforeground='white') filemenu.add_command(label="Open", command=None) filemenu.add_command(label="Save", command=None) menubar.add_cascade(label="File", menu=filemenu) root.config(bg='#2A2C2B', menu=menubar) root.mainloop() Regards. Alejandro A. _______________________________________________ Tkinter-discuss mailing list [email protected] https://mail.python.org/mailman/listinfo/tkinter-discuss
image.png
(image/png, 12.4 KB) - not displayed