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
these are the required values ๐๐
time_after_which_it_should_destroy
these 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
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file tksplash-0.0.5.tar.gz.
File metadata
- Download URL: tksplash-0.0.5.tar.gz
- Upload date:
- Size: 2.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.4.2 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.8.0 tqdm/4.30.0 CPython/3.8.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cfabdf2fe9b043019efdbfc7c691a7fb0170f8dd7d9d41fbc2ad857960b5a294
|
|
| MD5 |
0aa7e3d43dba72c4a17c594b77da60d1
|
|
| BLAKE2b-256 |
2962c33aa02946b9d03fc9ecaf1732d262900a777978e71cab56d2c44d58ec96
|
File details
Details for the file tksplash-0.0.5-py3-none-any.whl.
File metadata
- Download URL: tksplash-0.0.5-py3-none-any.whl
- Upload date:
- Size: 3.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.4.2 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.8.0 tqdm/4.30.0 CPython/3.8.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
550fa4d963a2a867f428321ab533e77bea6511fe42512fdfd769520023731278
|
|
| MD5 |
7dee4ab607c8b1b5486e971ae8923ee1
|
|
| BLAKE2b-256 |
3852807ed865b92f73e1a7f9aa487f66828df92fc1922e0112285fbe5de5f8a5
|