Fundo de etiqueta Tkinter Python transparente
Eu tenho uma janela com uma etiqueta como o meu quadro. Eu fiz isso porque queria uma imagem no fundo. Mas agora estou tendo problemas com os outros rótulos que eu usei. Os outros rótulos que eu usei para rotular as coisas não têm um fundo transparente. Existe uma maneira de tornar o plano de fundo desses rótulos transparente?
<code>import Tkinter as tk root = tk.Tk() root.title('background image') image1 = Tk.PhotoImage(file='image_name.gif') # get the image size w = image1.width() h = image1.height() # make the root window the size of the image root.geometry("%dx%d" % (w, h)) # root has no image argument, so use a label as a panel panel1 = tk.Label(root, image=image1) panel1.pack(side='top', fill='both', expand='yes') # put a button/label on the image panel to test it label1 = tk.Label(panel1, text='here i am') label1.pack(side=Top) button2 = tk.Button(panel1, text='button2') button2.pack(side='top') # start the event loop root.mainloop() </code>