467,923 Members | 1,168 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 467,923 developers. It's quick & easy.

tkinter entry eat chars?

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

Jul 18 '05 #1
  • viewed: 1319
Share:
1 Reply
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" <ph***********@anvilcom.com> wrote in message
news:ma***************************************@pyt hon.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

Jul 18 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Thomas NŁcker | last post: by
1 post views Thread by snx7s | last post: by
reply views Thread by phil | last post: by
3 posts views Thread by Matt Hammond | last post: by
1 post views Thread by C Martin | last post: by
reply views Thread by Eric Brunel | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.