简体   繁体   中英

Transparent Window Background (Python Tkinter)

What I need is a tkinter window that is transparent,
but with a image displayed on this window is not.

I've seen the

w.attributes('-alpha', 0.1)

thing, but that makes the image transparent as well.

I need just the background of the window transparent,
so that an image on the window that has transparent parts,
will show the Users desktop through these parts.

Are there anyways to do this in Python?

(specs:
Python 2.7.1
Tkinter
PhotoImage
Windows7)

I would suggest another ui library

pretty much a duplicate to Is it possible to create a Tkinter Window with no frame, and no background?

I just learnt that pygame don't support window transparency but according to the last post here wxPython does if that's an option

more links:
draws under windows over desktop(you can adapt I think) Discussion about various ways to implement

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM