Search code examples
pythontkintermenubar

How to change the colour of menu in Tkinter under windows?


I'm using windows xp. I want to change menubar and labels foreground and background in TKinter. But, I'm unable to change. Can I change it in windows xp or I have to upgrade it to windows 7.

from Tkinter import *
root = Tk()

menubar = Menu(root)
menubar.add_command(label = 'Label1', command = log, background = 'Black', foreground = 'Red')

root.config(menu=menubar)
root.mainloop()

I'm able to display what I want and my code is working perfectly in Linux. But, it's not changing the color in window. Do I need to use any additional commands to make it work?


Solution

  • There is nothing you can do. Tkinter uses a native menu object for the menus, which means they will have exactly the same look and feel of other windows menus.