467,077 Members | 945 Online
Bytes | Developer Community
Ask Question

Home New Posts Topics Members FAQ

Post your question to a community of 467,077 developers. It's quick & easy.

Background/foreground on disabled Tkinter.Entry

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?

Thanks,

Martyn

Jan 22 '06 #1
  • viewed: 10868
Share:
2 Replies
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:

http://www.effbot.org/tkinterbook/en....config-method

</F>

Jan 22 '06 #2
Thanks v. much.
I'd missed that in the documentation I have access to.

Martyn

Jan 22 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Phil Schmidt | last post: by
5 posts views Thread by Otto Krüse | last post: by
1 post views Thread by phil | last post: by
2 posts views Thread by Ian Vincent | last post: by
reply views Thread by Leonhard Vogt | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.