I have a ttk Entry which is in "disabled" state. The background color of the entry field while disabled is a light blue shade. How can i change it to the default grey color? From this post i understood how we can change the foreground color. tkinter ttk Entry widget -disabledforeground
I tried the same method for background color and it did not work. I am using python 2.7 in Windows 7.
This is the code i tried as per the above said post:
from Tkinter import *
from ttk import *
root=Tk()
style=Style()
style.map("TEntry",background=[("active", "black"), ("disabled", "red")])
entry_var=StringVar()
entry=Entry(root,textvariable=entry_var,state='disabled')
entry.pack()
entry_var.set('test')
root.mainloop()