Skip to main content

Creates splash screens for GUIs

Project description

The tksplash module can be used to make splash screens for all of your GUIs which you make using tkinter

These are some examples on how to use this module :

import tkinter
import tksplash

window = tkinter.Tk() #making a basic window 

width = window.winfo_screenwidth() # getting the screen width
height = window.winfo_screenheight() # getting the screen height

window.geometry("%dx%d" % (width, height)) # setting the window with respect to the height and width

tksplash.add_splash_text(window, "Hello World", width, height, 100)

window.mainloop()

the tksplash.add_splash_text() takes in exactly 8 arguments and out of which only 5 are required the other 3 are optional

window, text, width, height, font_size

these are the required values 👆👆

font_style , text_colour , time_after_which_it_should_destroy

these are the optional values 👆👆


window--> you have to provide the name of the window

text--> the text you want to display

widht--> the width of the window

height--> the height of the window

font_size--> the value for the font size

font_style--> which font style do you want ??

text_colour--> the colour of the fonts

time_after_which_it_should_destroy --> the time that the text is being shown 🕛


An example using all the arguments

import tkinter
import tksplash

window = tkinter.Tk()
width = window.winfo_screenwidth()
height = window.winfo_screenheight()

window.geometry("%dx%d" % (width, height))

tksplash.add_splash_text(window, "Hello World", width, height, 100, font_style="Lucida Grande", text_colour='white',time_after_which_it_should_destroy=3000)

window.mainloop()

⚠⚠⚠⚠

Note->the text_colour can also be written as #RRGGBB

Note->The value of time_after_which_it_should_destroy should be entered in millisecond(ms), (1 s = 1000ms)


Adding an image in the splash screen

tksplash.add_image(window,"ts.png", 500, 500, 20, 40)

The add_image() function takes in exactly 7 arguments and out of that only 6 are required and 1 is optional

window, img, img_x, img_y, place_x, place_y

the values above are the required values 👆👆

time_after_which_it_should_destroy

the values above are the optional values


window--> you have to provide the name of the window

img--> the image you want to project on the splash screen

img_x--> the width of the image

img_y--> the height of the image

place_x--> the x value where you want to place the image

place_y--> the y value where you want to place the image

time_after_which_it_should_destroy --> the time that the text is being shown


Adding image as well as text use add_image_text() function

It takes in these values

window, text, width, height, font_size, img, img_x, img_y, place_x, place_y,font_style="Lucida Grande", text_colour='#FF002D', time_after_which_it_should_destroy=3000


Adding a gif to the GUI - Use the add_gif() or add_gif_text function

The add_gif() function takes in these arguments window, gif, place_x, place_y, time_after_which_it_should_destroy where time_after_which it_should_destroy is optional

The add_gif_text() function takes in these arguments window, text, width, height, font_size, gif, place_x, place_y, font_style="Lucida Grande", text_colour='#FF002D', time_after_which_it_should_destroy=3000 where font_style, text_colour, time_after_which_it_should_destroy are optional

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tksplash-0.0.7.tar.gz (3.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tksplash-0.0.7-py3-none-any.whl (3.8 kB view details)

Uploaded Python 3

File details

Details for the file tksplash-0.0.7.tar.gz.

File metadata

  • Download URL: tksplash-0.0.7.tar.gz
  • Upload date:
  • Size: 3.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.4.2 requests/2.25.1 setuptools/52.0.0 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.9.2

File hashes

Hashes for tksplash-0.0.7.tar.gz
Algorithm Hash digest
SHA256 bad513aae032167197e085da1bd9b175c64bbb61d76bbc8a637c24dbda70fce3
MD5 562a928827c4aeccd5b6562edec891df
BLAKE2b-256 eb900b00641a138cd52757efdb33310f82468a2707fc5404b9f888dc357a548a

See more details on using hashes here.

File details

Details for the file tksplash-0.0.7-py3-none-any.whl.

File metadata

  • Download URL: tksplash-0.0.7-py3-none-any.whl
  • Upload date:
  • Size: 3.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.4.2 requests/2.25.1 setuptools/52.0.0 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.9.2

File hashes

Hashes for tksplash-0.0.7-py3-none-any.whl
Algorithm Hash digest
SHA256 06dac91e4b75a99d0d7e9eed498ac2703fcc84832e62fe1f6776c9d0d66b66ff
MD5 e5d336400292928567d3e474adc0cbc6
BLAKE2b-256 f8e97a0297df2116a0fec4a4c02782e55852c428fbc188221caf17caa3c6ba2b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page