tkinter Delaying a function

Help us to keep this website almost Ad Free! It takes only 10 seconds of your time:
> Step 1: Go view our video on YouTube: EF Core Bulk Insert
> Step 2: And Like the video. BONUS: You can also share it!

Syntax

  • widget.after(delay_ms, callback, *args)

Parameters

ParameterDescription
delay_msTime (milliseconds) which is delayed the call to the function callback
callbackFunction that is called after the given delay_ms. If this parameter is not given, .after acts similar to time.sleep (in milliseconds)

Remarks

Syntax assumes a widget accepted by the method .after has been previously created (i.e widget=tk.Label(parent))



Got any tkinter Question?