tkinter entry eat chars?

Harlin Seritt hseritt at pythonian.com
Fri Mar 4 19:15:56 EST 2005


You can use the textvariable option for the Entry widget. Set a bind event
for this widget that when any key pressed the StringVar() will be polled via
StringVar().get(). You do some checking for certain chars you don't want
entered and then delete them as they occur.

Harlin

"phil" <phillip.watts at anvilcom.com> wrote in message
news:mailman.3306.1109866451.22381.python-list at python.org...
> In a Tkinter entry field (or Pmw entry)
> how could I eat charactres?
>
> Say a certain char is keyed in. Say &
> I notice in the event handler for <key>.
> I don't want any more charactres to display or
> be in the field until I handle a see, in the
> event handler, another character. Say ?
>
> Can the event handler somehow destroy the char?
>
> Thanks
>





More information about the Python-list mailing list