Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   Python (http://www.velocityreviews.com/forums/f43-python.html)
-   -   Background/foreground on disabled Tkinter.Entry (http://www.velocityreviews.com/forums/t353657-background-foreground-on-disabled-tkinter-entry.html)

Martyn Quick 01-22-2006 01:34 PM

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


Fredrik Lundh 01-22-2006 01:46 PM

Re: Background/foreground on disabled Tkinter.Entry
 
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>




Martyn Quick 01-22-2006 06:27 PM

Re: Background/foreground on disabled Tkinter.Entry
 
Thanks v. much.
I'd missed that in the documentation I have access to.

Martyn



All times are GMT. The time now is 05:49 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.