Tkinter text with transparent background Tkinter text with transparent background tkinter tkinter

Tkinter text with transparent background


There are multiple ways of doing this, for example you could have an png image with text(do this via a photo editor), you can use a canvas and draw on that, or you can use a disabled button with an image background with text.

Canvas:

c = tk.Canvas(root)c.pack()c.create_image(x, y, img)c.create_text(x, y, "My Text")

Button:

img = PhotoImage(file="file.png")b = tk.Button(root, text="My Text", image=img, relief="FLAT", state="DISABLED")b.image = imgb.pack()