so i'm doing a project for school with tkinter what i'm currently trying to do is display an image that is a 450x450px .gif
what it needs to do is open > 20sec delay > close
here is the current code
photo = tkinter.PhotoImage(file = './Images/img1.gif')
root.geometry("450x450")
root.update()
canvas.create_image(225,225, image=photo)
root.mainloop()
https://i.stack.imgur.com/PSCce.png is the current result
Save the return value of the
create_image
(item id), then use that value when you delete the image usingcanvas.delete
.Using
after
, you can do some stuff after specified time.