I have an issue with the Event-Handling. My Code is as follows:
import tkinter
def my_function(event):
print("Event Char: " + event.char)
print("Input Field: " + my_input.get())
window = tkinter.Tk()
my_input = tkinter.Entry()
my_input.bind("<Key>", my_function)
my_input.grid(row=0, column=1)
window.mainloop()
If I run my programm and enter the letters a, b , c in sequence, then my prints are, as follows:
I do not understand why my_input
is lagging behind. Is this a bug? How can I fix this?
Thx in advance