Need some way to have virtual events that fire after specified time, for example, to join a long running background thread to check progress. Tkinter’s after and event_generate methods should make this easy.
For example, perhaps a Window.bind_timer_event(delay, event_name, repeat=False) -> timer_id:
This would fire event_name virtual event after delay (ms) which could be handled by handle_event. If repeat = True, the virtual event would fire every delay ms until canceled. Returns timer_id which can be used to cancel the event with Window.cancel_timer_event(timer_id)
Need some way to have virtual events that fire after specified time, for example, to join a long running background thread to check progress. Tkinter’s
after
andevent_generate
methods should make this easy.For example, perhaps a
Window.bind_timer_event(delay, event_name, repeat=False) -> timer_id
:This would fire
event_name
virtual event afterdelay
(ms) which could be handled byhandle_event
. Ifrepeat = True
, the virtual event would fire everydelay
ms until canceled. Returnstimer_id
which can be used to cancel the event withWindow.cancel_timer_event(timer_id)