Is there a way to make just the label background invisible/transparent using Tkinter?

3.7k views Asked by At

I wrote a simple GUI program using Tkinter (ttk):

In the center of the window, there's a label with an image. The image self is a transparent GIF. But if the image has alpha-background, you can see through the image and see the background color of the label.

View example

Is there an way to make JUST the image on the label visible and not the label(-background) itself?

If I try it with common ways, the whole label disappears. And I won't set the background color to 'White', because I need this method in other cases when the background is coloured in more than one colour.

//Edit: This doesen't work:

labelSpeichern=ttk.Label(root, image=predef.speicherngif, background="Transparent")
labelSpeichern.place(x= 250, y=300, width= 200, height=40)
0

There are 0 answers