Background/foreground on disabled Tkinter.Entry

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Martyn Quick

    #1

    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(r oot, foreground="bla ck", background="whi te",
    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

    #2
    Re: Background/foreground on disabled Tkinter.Entry

    Martyn Quick wrote:
    [color=blue]
    > 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(r oot, foreground="bla ck", background="whi te",
    > state="disabled ").grid()
    >
    > does not do what I expected. What is the correct way to adjust the
    > foreground and background on disabled Entry widgets?[/color]

    tkinter has separate disabledbackgro und and disableforegrou nd options for
    this purpose:



    </F>



    Comment

    • Martyn Quick

      #3
      Re: Background/foreground on disabled Tkinter.Entry

      Thanks v. much.
      I'd missed that in the documentation I have access to.

      Martyn

      Comment

      Working...