[ltk-user] :textvariable

Peter Herth herth at peter-herth.de
Mon Nov 2 08:40:11 UTC 2009

To read and set the content of any tktextvariable descendant widget, you can use
the "text" generic function. So if you have a label called lbl, you
can read its current
text with
(text lbl)
and change it with
(setf (text lbl) "Hello World")

If you need to track content changes e.g. with the entry widget (which
also inherits
from tktextvariable), bind the "<KeyPress>" event, and you can read the new text
contant also with the text function.
Does this address all your needs?


More information about the ltk-user mailing list