[Tutor] Read - Only Text?
D-Man
dsh8290@rit.edu
Mon, 5 Mar 2001 18:13:32 -0500
On Mon, Mar 05, 2001 at 07:06:31AM -0500, Michael P. Reilly wrote:
| > Hi:
| > I need to set up a widget that :
| >
| > 1)Displays text
| > 2)Allows copy and paste
| > 3)But does "not" allow editing
| >
| > Question: I can't find a way to set the TKinter Text widget to
| > read - only. That is, not editable.
| >
| > Is there a way?
| > If not, can someone recommend an alternative?
|
| About the "best" way (which I've still found some problems with) is to
| use a Text widget and to unbind the key events in the Text "class".
Ugh. Swing and GTK have methods/functions like
field = javax.swing.JTextField( )
file.setEditable( 0 )
(you can use Swing if you use the Jython interpreter)
I don't recall off-hand the exact name of the GTK function.
Just some info ...
-D