I would like to filter dataset with a delay.
I have this basic layout:
import tkinter as tk
def filter(*args):
print('entry callback', 'changed %s' % str(args))
print('limit result set with', filter_input.get())
if __name__ == "__main__":
master = tk.Tk()
filter_input = tk.StringVar(value='') # filter mode
# filter_input.trace('w', filter) # simple trace triggers immediately
# filter_input.trace_variable('w', filter) # trace_variable as well
filter_input.trace_add('write', filter) # trace_add should replace previous (deprecated)
entry_field = tk.Entry(master, textvariable=filter_input)
entry_field.pack()
tk.mainloop()
I started with main Tkinter python page
I went through the main widget documentation
There are a bunch of more documentation around the globe, but I can't find anywhere any mention about a delay implemented. Can anyone help me to find out, if there is possible to call the filter function after some defined amount of time? Maybe another wrapper function could help?
EDIT:
It looks like I need to clear out the desired functionality. This is somehow what I am after but I need a delay instead of "user-stops-typing" activity.