from Tkinter import *
import ttk
main=Tk()
def print1(event):
string = ""
string = combobox1.get()
print combobox1.get()
val = StringVar()
combobox1 = ttk.Combobox(main, textvariable=val, height=4)
combobox1.bind("<Key>", print1)
combobox1.focus_set()
combobox1.pack()
mainloop()
How can I fix the problem that is, when I press the first button, it didn't show immediately.
For example, when I pressed a, it didn't show anything, and then I pressed b. It will show a, but not ab.
How can I fix this bug?
thanks.