Transparent backgrounds on buttons in Tkinter
I have Button
with a button image, but when it is in my window, the background of the button collides with the background of the window. This is a .png image but tkinter
seems to want to save the image as a quad by adding gray space. Is there a way to make the white space of the button transparent so that you are only left with the button image?
I am using Python 3.4.2 on Windows 8.
If you are using .png with import PIL
, python supports transparency.
However, the tkinter
widget .Button
does not support transparency.
So, you will have a transparent image on top of a solid background.
If you are a Windows user, the best solution is:
Transparent background in Tkinter window