Python Tkinter Loading Screen 

The GUI (Graphical User Interface), is a system of interactive user interfaces that allows users to communicate with electronic graphical components like icons, buttons, and menus.

 

Python Tkinter Loading Screen GUI

 

 

In this article, we will learn how to create a Python tkinter loading screen or splash screen.

About this project

This Python Tkinter Loading Screen or splash screen GUI was made using Tkinter.ttk library. The loading screen includes a progress bar that displays a counting label in percentage. The progress bar moves along with the label counting in percentage unto it reaches a maximum of “100%” and then opens another page as Homepage.

You Can Also Watch The Tutorial Video Below For More Understanding

 

 

Full Tutorial Video From YouTube.

 provides a fast and easy way to create GUI Applications. Tkinter is popular, simple, and widely used, and also has a ton of references to get you started.

Creating A Window

Let’s start by creating a window. It’s really quite simple using Tkinter. Let’s create a new Python file called main.py.

 

from tkinter import *
root = Tk()
root.geometry('530x430')
root.mainloop()

output: ……

 
A blank empty window.
 
 

In the first line inside the code snippets, we imported all the functions for the Tkinter module. Using will import all. In the second line, we used ” root ” and assigned it to Tk() which is the standard name for initializing the Tk root widget. The root widget, which is the main window and our parent window, has to be created before any other windows. Also, there can be only one root. Then we gave our window a size using geometry with width: 900 and height: 600. Finally, the last line runs the main loop event.

Now, after running our window you will notice that the window is not aligned exactly at the center of the screen. So let’s fix it.

 

from tkinter import *

root = Tk()

# Making window align to the center
height = 430
width = 530
x = (root.winfo_screenwidth()//2)-(width//2)
y = (root.winfo_screenheight()//2)-(height//2)
root.geometry('{}x{}+{}+{}'.format(width, height, x, y))

root.mainloop()

You can download the starter code below to follow along

After downloading the starter code above follow along in the tutorial video below

PART ONE (1)

Part 1 Tutorial Video From YouTube ..

 

 

PART ONE (2)

Part 2 Tutorial Video From YouTube ..

 

Summary

In this article, we looked at the graphical user interfaces of a modern python tkinter loading screen or splash screen made using Python Tkinter.

My name is Sen Gideons, If you have any questions or comments about this tutorial, please feel free to leave them in the comments section below.