tkinterDelaying a function


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))