[Tutor] Re; Making a text box read-only.

Chris McCormick livelikemad@yahoo.com
Mon, 5 Mar 2001 06:55:08 -0800 (PST)


Tim,
  I haven't treid this yet, but there is a pretty good
explanation of text box attributes at the following
address:

http://www.pythonware.com/library/tkinter/introduction/x7931-patterns.htm

Looks like you might need to set state attribute:

text.config(state=NORMAL)    

Normal is default, and will allow entry.

text.config(state=DISABLED) 

Disabled will not allow typing in the box.  As for
copying and pasting?  I don't know.  But look at the
page, play around with it, and let us know.  :-)

While we're at it, I'm stuck with my own text box
problem.  I know this has ot be simple, but I can't
find it in any of the Tkinter docs I have.  **How do I
grab the contents of the box?**

I'm writing a notes program.  I want to have a button
that will set off a function to grab the text in the
box and input it into a text file.  What is the name
of the data structure that contains the information
typed into the box?  It's probably a list full of
individual lines....

Hope that helps, and maybe someone will answer my
piggyback question.  :-)

- Chris 

__________________________________________________
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail. 
http://personal.mail.yahoo.com/