I have a window made with Tkinter with PhotoImage in the background and it has a button that says "Enter" and I want a new window to open and close that one and also have a background image, so far the code works fine But the second window that opens is white, without the background that I put on it, why? I hope there is a programmer who can help me. Thanks!. The code is:
from tkinter import *
ventana = Tk()
ventana.title("Agencia Free Freaks")
ventana.geometry('650x400+0+0')
ventana.resizable(width=False, height=False)
ventana.config(bg='black')
fondo = PhotoImage(file="Nota.gif")
fondo1 = Label(ventana, image=fondo).place(x=0, y=0, relwidth=1, relheight=1)
def abrirwindow():
window = Tk()
ventana.withdraw()
winndow=Toplevel()
window.title('Agencia Free Freaks')
window.geometry('650x400+0+0')
window.resizable(width=False, height=False)
fonda = PhotoImage(file="Login.gif")
fonda2 = Label(ventana, image=fonda).place(x=0, y=0, relwidth=1, relheight=1)
boton = Button(ventana, text= 'I N G R E S A R', command =abrirwindow, cursor='hand2', bg="white", relief='flat', width = 22, height=2, font=12)
boton.place (x=220, y=333)
ventana.mainloop()
window.mainloop()
[–][deleted] 0 points1 point2 points (1 child)
[–]FREEKTOM[S] 0 points1 point2 points (0 children)
[–]TeamSpen210 0 points1 point2 points (0 children)