Re: Change menubar color?

Juan Christian <[email protected]>
Newsgroups gmane.comp.python.tkinter
Message-ID <CAAp0bGvt1f6QJiRfA+pPc8XcTUX3-h2L-sq+DC52NRO9DkJHAA@mail.gmail.com>
from tkinter import *

root = Tk()
root.title("Steam Trader")
root.minsize(600, 800)
root.maxsize(600, 0)

menubar = Menu(root, background='#374140', foreground='black',
activebackground='#374140', activeforeground='black')
filemenu = Menu(menubar, tearoff=0, background='#374140',
foreground='#D9CB9E', activebackground='#D9CB9E',
activeforeground='#374140')
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()

---

Ok, it's somewhat working, but the menu isn't colored yet, just the
'filemenu'.

[image: Inline image 1]

On Mon, Oct 27, 2014 at 6:35 PM, Alejandro Autalan <
[email protected]> wrote:

> 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, 90.4 KB) - not displayed
image.png (image/png, 12.4 KB) - not displayed
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.