Bandeau blanc dans une image
RésoluBonjour,
Je voudrais faire un programme python dans lequel des actions pourront être exécutées et j'ai un problème d'affichage lorsque je rajoute un texte ou un bouton.
J'espère que quelqu'un réussira à élucider ce mystère et j'attends vos réponses avec impatience !
Voici le programme, merci d'avance.
from tkinter import*
root = Tk()
root.title("Bêta")
root.attributes("-fullscreen", True)
root.iconbitmap("play.ico")
root.minsize(1280, 720)
x = 0
def screen(event):
global x
x += 1
if x & 1 == 0:
root.attributes("-fullscreen", True)
else:
root.attributes("-fullscreen", False)
root.state("zoomed")
root.bind("<F11>", screen)
ftn = PhotoImage(file="Fortnite.png")
button_fortnite = Button(root, image=ftn)
button_fortnite.pack(expand=True)
img = PhotoImage(file="fond.png")
label_fond = Label(root, image=img)
label_fond.pack()
root.mainloop()
Windows / Edge 108.0.1462.54