Skip to content
Advertisement

Labels with no background tkinter

I’m making a tkinter app with a background image and three labels.

The problem that I have is that these labels have a white background and I don’t want that. I want to make like a “png” label, with no background.

First, I tried to put this line of code:

JavaScript

But it didn’t work, literally, the label was a hole.

Then I searched for a solution, and I saw that the best way to make labels with no background is using canvas, but there were more bugs, however, I think that’s the solution, but I don’t know how to do it.

This is my code:

JavaScript

EDIT: Now I’m testing with some code, like this:

JavaScript

Advertisement

Answer

This could be improved upon, but here’s an illustration of a general idea: Cut out smaller images from the background image and use them as background in the labels.

JavaScript

Live Demo: repl.it

User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement