code1
from Tkinter import *
root = Tk()
def callback(event):
    print "i am here"
    
frame = Frame(root, width=100, height=100)
frame.bind("<Return>", callback)
frame.pack()
root.mainloop()

when  i press  "enter",there is no output  "i am here"
code2
from Tkinter import *
root = Tk()
def callback(event):
    print "i am here"
    
frame = Frame(root, width=100, height=100)
frame.bind("<Key>", callback)
frame.pack()
root.mainloop()

 when  i press  any key ,there is no output  "i am here"
_______________________________________________
Tkinter-discuss mailing list
Tkinter-discuss@python.org
http://mail.python.org/mailman/listinfo/tkinter-discuss

Reply via email to