467,146 Members | 1,064 Online
Bytes | Developer Community
Ask Question

Home New Posts Topics Members FAQ

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

Numeric Entry in Tkinter

Earlier I asked about limitting what a user can enter in an Entry. I
got a few greatly appreciated replies, but I was hoping it would be
possible to take a more direct approach, that is, is there a method I
can override, when creating a class that inherits the Entry methods,
that is called whenever the user enters a key? I'm thinking something
like this in the override version:

def method(self, key):
if key in "1234567890":
Entry.method(self, key)
else:
pass

Is this possible? I suppose key would actually be accessed using an
associated get() method or something of the sort, but you get the idea.
Is there such a method?

Jan 23 '06 #1
  • viewed: 1021
Share:

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

5 posts views Thread by Otto Krse | last post: by
2 posts views Thread by Ian Vincent | last post: by
2 posts views Thread by Martyn Quick | last post: by
3 posts views Thread by asit | last post: by
1 post views Thread by skanemupp@yahoo.se | last post: by
reply views Thread by Leonhard Vogt | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.