Background/foreground on disabled Tkinter.Entry

Fredrik Lundh fredrik at
Sun Jan 22 08:46:26 EST 2006

Martyn Quick wrote:

> If I create a Tkinter.Entry widget, I can adjust the background and the
> text colours, using the background and foreground options.  However, if
> the state is "disabled", then this has no effect and it just appears as
> grey on a light grey background.  E.g.,
> Tkinter.Entry(root, foreground="black", background="white",
> state="disabled").grid()
> does not do what I expected.  What is the correct way to adjust the
> foreground and background on disabled Entry widgets?

tkinter has separate disabledbackground and disableforeground options for
this purpose:


More information about the Python-list mailing list