views:

24

answers:

2

It doesn't look like it has that attribute, but it'd be really useful to me.

+3  A: 

You have to change the state of widget from NORMAL to DISABLED:

text.config(state=DISABLED)

For more information, see The Tkinter Text Widget.

ars
+1  A: 

In addition to setting the state to disabled as suggested in another answer, another choice is to simply remove all bindings and then add in any specific bindings you want (such as space bar to scroll, control-c to copy, etc).

You might be interested in reading the page Read-only text widget on the Tcl'ers wiki. Even though it's written from a Tcl point of view the discussion is still relevant, and the solutions given can easily be adapted to Tkinter.

Bryan Oakley