from tkinter import * def power(event): quit() def bleu(): print("a") root = Tk() c = Canvas(root,) c.pack() # image '''fond = PhotoImage(file="a faire")''' bouton1 = PhotoImage (file="power.gif") bouton2 = PhotoImage (file="bleu") #image de fond '''c.create_image(0, 0, image=fond, anchor=NW)''' # bouton cliquable (50, 50) c.create_image(100, 150, image=bouton1, tag="c1") c.create_image(300,150,image=bouton2, tag="c2") # tag_bind(, , ) c.tag_bind("c1", "", power) c.tag_bind("c2","", bleu) root.mainloop()