Tk Text box

Is there any way I can create a text box in Tk that the user cannot
edit, but the program can edit the value of? I have tried doing state
(‘disabled’) on a TkText but this makes it not editable at all.

Also, is there a way I can bind an event to someone hitting enter in a
TkEntry?

From: Philliam A. [email protected]
Subject: Tk Text box
Date: Fri, 29 Jan 2010 13:45:06 +0900
Message-ID:
[email protected]

Is there any way I can create a text box in Tk that the user cannot
edit, but the program can edit the value of? I have tried doing state
(‘disabled’) on a TkText but this makes it not editable at all.

Remove its classs from the bindtags of the widget.
Probably, it is the most simple way.
For example,

t = TkText.new
t.bindtags -= [t.class]

On Jan 28, 11:10 pm, Hidetoshi NAGAI [email protected] wrote:

Probably, it is the most simple way.
e = TkEntry.new
e.bind(‘Return’){ … callback operation … }


Hidetoshi NAGAI ([email protected])

Thanks, that’s exactly what I needed.