Skip to main content

Allows acrylic/transparent effect on tkinter

Project description

#AcrylicTK

This package will add acrylic/transparency support to tkinter.

##How to use

###Installing First thing, you have to install it! use this command to install

pip install acrylictk

###Making the window Making a window is almost the same as tkinter. But to use widgets or tkinter methods you will need access it by using the atk variable. here is how to make a new window

from AcrylicTK import *

win = ATK()

win.atk.mainloop()

You need to refrence the window like this ###Adding widgets Adding widgets is pretty easy. We will add a simple label that says hello

from AcrylicTK import *


win = ATK()

lbl = Label(win.atk, text="Hello", font="arial 10")
lbl.place(x=0, y=0)

win.atk.mainloop()

#Making a transparent spot Now for the whole point of the libary. To make a transparent spot use the widget that AcrylicTK adds called transparency. Here is how you use it.

from AcrylicTK import *


win = ATK()

tsp = transparency(win.atk, 10000, hieght=100)
tsp.place(x=0, y=0)
lbl = Label(win.atk, text="Hello", font="arial 10")
lbl.place(x=0, y=0)

win.atk.mainloop()

There, now we have a transparent spot The effects will only work on an ATK window To make the background of the text transparent I added a variable called acrylic use it in the bg argument of the label like this.

from AcrylicTK import *


win = ATK()

tsp = transparency(win.atk, 10000, hieght=100)
tsp.place(x=0, y=0)
lbl = Label(win.atk, text="Hello", font="arial 10", bg=acrylic)
lbl.place(x=0, y=0)

win.atk.mainloop()

#ATK Methods Here are all the useful methods that acrylicTK adds ##ATK() ATK is the class that makes the window Arguments: darkMode - enables dark title bar ##ATK.config() Change settings for the window

from AcrylicTK import *


win = ATK()

win.config(windowPosX=100, windowPosY=100, windowWidth=500, windowHieght=400, acrylic=False)

tsp = transparency(win.atk, 10000, hieght=100)
tsp.place(x=0, y=0)
lbl = Label(win.atk, text="Hello", font="arial 10", bg=acrylic)
lbl.place(x=0, y=0)

win.atk.mainloop()

You can guess what the first four aguments are but the last argument if True will enable the acrylic effect like seen in the windows 10 start menu if False, It will just be a simple blur

##ATK.update() This updates the window. use this NOT ATK.atk.update()

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

AcrylicTK-0.1.0.tar.gz (7.3 kB view details)

Uploaded Source

Built Distribution

AcrylicTK-0.1.0-py3-none-any.whl (10.1 kB view details)

Uploaded Python 3

File details

Details for the file AcrylicTK-0.1.0.tar.gz.

File metadata

  • Download URL: AcrylicTK-0.1.0.tar.gz
  • Upload date:
  • Size: 7.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.5

File hashes

Hashes for AcrylicTK-0.1.0.tar.gz
Algorithm Hash digest
SHA256 d40c11376574eab74402be23ba69f10e003ef95369657d8892541de1bd5e67c4
MD5 58adaee7792c668013c55573415e42b8
BLAKE2b-256 82cba5957fe252705e28a77fc5a4dbfe19a49bbf800f4b18ab15dca71a81740a

See more details on using hashes here.

File details

Details for the file AcrylicTK-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: AcrylicTK-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 10.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.5

File hashes

Hashes for AcrylicTK-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8e6a2e535210b107eba43f47a7e3b56385dbef495aaf965ddacb8a4b24aab827
MD5 07e17e510ed8cca23a7aa9886e258b54
BLAKE2b-256 daf8636ea0a03aa4ffa85478dfa469c3fcdb1edbbaef3c040c25f6dbe3029564

See more details on using hashes here.

Supported by

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