codecraig wrote:
Hi,
When I do something like.
s = Scale(master)
s.bind("<ENTER>", callback)
def callback(self, event):
print event.type
I see "7" printed out. Where are these constants defined for various
event types? Basically i want to do something like...
7 must be for KeyPressed.
That's the type of the event (among Activate, Button, KeyPressed...).
def callback(self, event):
if event.type == ENTER:
print "You entered"
You may want to look at event.keycode (36 for Return).
--
http://mail.python.org/mailman/listinfo/python-list