Re: [Tkinter-discuss] bind between event and callback

2011-08-16 Thread Firat Ozgul
The reason why you get no response is the lack of focus when you first create the frame. Therefore you should set the focus on frame manually, like this: [code] from Tkinter import * root = Tk() def callback(event): print "i am here" frame = Frame(root, width=100, height=100) frame.bind("", ca

[Tkinter-discuss] bind between event and callback

2011-08-16 Thread 守株待兔
code1 from Tkinter import * root = Tk() def callback(event): print "i am here" frame = Frame(root, width=100, height=100) frame.bind("", 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