Tkinter provides many built-in functions for developing an interactive and functional graphical user interface (graphical user interface). The
after() function is also a generic function that can be used directly at the root, as well as with other widgets.
after (parent, ms, function = None, * args)
parent : is the object of the widget or main window whichever is using this function.
ms : is the time in miliseconds.
function : which shall be called.
* args strong>: other options.
Code # 1:
When you run the program, it will show a Tkinter window with a
# only import functions that
# are required
Tk, mainloop, TOP p>
_ show p>
# create a tkinter window
` 200x100 + 300 + 250`
Button (root, text
# in 5000 milliseconds after the method
# passed i.e. after 5 seconds
# message will be offered
: _show (
` Prompting after 5 seconds`
# Destroying the root window after 6.7 seconds
mainloop () code >
In output below after 5 seconds a message box will appear where you can even call any function after a certain period of time by passing the name of the function.