Entry widget -- how to prevent change

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

    #1

    Entry widget -- how to prevent change

    let's say I already have some content. How do I set the widget so user
    cannot change it/?

  • Grant Edwards

    #2
    Re: Entry widget -- how to prevent change

    On 2005-11-22, wanwan <ericwan78@yaho o.com> wrote:
    [color=blue]
    > let's say I already have some content. How do I set the widget so user
    > cannot change it/?[/color]

    Most widgets have some sort of "read-only" or "edit enable"
    attribute you can set. Look at the documentation for the
    widget in question. Since you don't specify what toolkit you're
    using, that about as specific an answer as you're going to get...

    --
    Grant Edwards grante Yow! I've read SEVEN
    at MILLION books!!
    visi.com

    Comment

    • Fredrik Lundh

      #3
      Re: Entry widget -- how to prevent change

      "wanwan" <ericwan78@yaho o.com> wrote:
      [color=blue]
      > let's say I already have some content. How do I set the widget so user
      > cannot change it/?[/color]

      assuming that you're talking about the Tkinter Entry widget, setting
      the state option to "readonly" should do the trick:

      e = Entry(...)
      e.config(state= "readonly")

      also see



      </F>



      Comment

      Working...