How to add Splash Screen in Python Tkinter - Codersarts

Updated: Sep 4, 2019



In this blog we will learn how to add splash window in tkinter. To start this first we will know about splash window.


What is splash window ?


A splash window or screen is a particular window or screen on a website or piece of software that displays while the application or other item is loading. After the load is complete, the user is generally taken to another more functional screen. The splash screen is generally just a display screen to orient users and give them something to look at while hardware is working to present the software to them.


A splash screen is also known as a start screen or startup screen.


Here we add small code which is written in python tkinter :


First import all library in python main file :



Code of splash.py

#ImportLibrarHere

from tkinter import *

from tkinter import ttk

import time

import datetime

from PIL import ImageTk,Image

import os

import sqlite3

from tkinter import messagebox


#SplashScreen


sroot = Tk()

sroot.minsize(height=200,width=300)

sroot.title("Splash window")

sroot.configure()

spath = "images/mypic.png"

simg = ImageTk.PhotoImage(Image.open(spath))

my = Label(sroot,image=simg)

my.image = simg

my.place(x=0,y=0)

Frame(sroot,height=516,width=5,bg='black').place(x=520,y=0)

lbl1 = Label(sroot,text="Welcome to Codersarts",font='Timesnewroman 20 ',fg='blue')

lbl1.config(anchor=CENTER)

lbl1.pack(padx = 100, pady = 100)


#MainScreen


def mainroot():

root = Tk()

root.geometry('1080x500')

root.minsize(width=1080,height=550)

root.maxsize(width=1080,height=550)

root.configure(bg='white')

root.title("main window")

.

.

.

#AddWindowFunctionalityHere(like widgets, etc)

.

.

.

#EndOfMainWindow


# After this call the main window here


def call_mainroot():

sroot.destroy()

mainroot()

sroot.after(3000,call_mainroot) #TimeOfSplashScreen

mainloop()



If you want to read other codersarts arts top rated blog then click here



If you like Codersarts blog and looking for Programming Assignment Help Service,Database Development Service,Web development service,Mobile App Development, Project help, Hire Software Developer,Programming tutors help and suggestion  you can send mail at contact@codersarts.com.

Please write your suggestion in comment section below if you find anything incorrect in this blog post

Contact Us

Tel: (+91) 0120  4118730  

Time :   10 : 00  AM -  08 : 00 PM IST 

Registered address: G-69, Sector 63, 

 Noida - 201301, India

We Provide Services Across The different countries

USA    Australia   Canada   UK    UAE    Singapore   New Zealand    Malasia   India   Ireland   Germany

CodersArts is a Product by Sofstack Technology Solutions Pvt. Ltd.

  • CodersArts | Linkedin
  • Instagram