from tkinter import * import tkinter as tk root=tk.Tk() root.minsize(800, 480) root.maxsize(800, 480) root.title("Monsieur Fine Bouche") root.overrideredirect(1) Imagedefond =PhotoImage(file = '\Concepts\Image\Frigo\Fond.gif') Fond = tk.Label(root, image=Imagedefond) Fond.grid(row=1,column=1, rowspan=6,columnspan=6) panier=tk.Text(root, width=20, height=14) panier['bg']='black' panier['fg']='white' panier['font'] = "EraserDust 13" panier.place(x="580", y="60") l = '\n' u = 1 pe = u*6 pp = u*12 pd = u*5 esp = " " valeur="€" chaine1 = " Foie gras pistache " chaine2 = " Saumon gravlax " chaine3 = " Foie gras amareto " chaine4 = " Colin aux noisettes " chaine5 = " Saumon vanille " chaine6 = " Boeuf au whisky " chaine7 = " Opéra " chaine8 = " Cheese cake " chaine9 = " Forêt noire " e1= esp + str(u) + chaine1 + str(pe) + valeur + l e2= esp + str(u) + chaine2 + str(pe) + valeur + l e3= esp + str(u) + chaine3 + str(pe) + valeur + l p1= esp + str(u) + chaine4 + str(pp) + valeur + l p2= esp + str(u) + chaine5 + str(pp) + valeur + l p3= esp + str(u) + chaine6 + str(pp) + valeur + l d1= esp + str(u) + chaine7 + str(pd) + valeur + l d2= esp + str(u) + chaine8 + str(pd) + valeur + l d3= esp + str(u) + chaine9 + str(pd) + valeur + l def com1(): panier.insert(INSERT, e1) def com2(): panier.insert(INSERT,e2) def com3(): panier.insert(INSERT, e3) def com4(): panier.insert(INSERT, p1) def com5(): panier.insert(INSERT, p2) def com6(): panier.insert(INSERT, p3) def com7(): panier.insert(INSERT, d1) def com8(): panier.insert(INSERT, d2) def com9(): panier.insert(INSERT, d3) photo = PhotoImage(file = '\Concepts\Image\Frigo\Foie gras pistache.gif') Entrée1 = tk.Button(root, image=photo, width=160, height=120, relief="groove",bg="black", activebackground="white", borderwidth=0, command=com1) Entrée1.place(x="20", y="60") photo2 = PhotoImage(file = '\Concepts\Image\Frigo\Saumon gravlax.gif') Entrée2 = tk.Button(root, image=photo2, width=160, height=120, relief="groove",bg="black", activebackground="white", borderwidth=0, command=com2) Entrée2.place(x="20", y="200") photo3 = PhotoImage(file = '\Concepts\Image\Frigo\Foie gras amaretto.gif') Entrée3 = tk.Button(root, image=photo3, width=160, height=120, relief="groove",bg="black", activebackground="white", borderwidth=0, command=com3) Entrée3.place(x="20", y="340") photo4 = PhotoImage(file = '\Concepts\Image\Frigo\Colin aux noisettes.gif') Plat1 = tk.Button(root, image=photo4, width=160, height=120, relief="groove",bg="black", activebackground="white", borderwidth=0, command=com4) Plat1.place(x="210", y="60") photo5 = PhotoImage(file = '\Concepts\Image\Frigo\Saumon vanille.gif') Plat2 = tk.Button(root, image=photo5, width=160, height=120, relief="groove",bg="black", activebackground="white", borderwidth=0, command=com5) Plat2.place(x="210", y="200") photo6 = PhotoImage(file = '\Concepts\Image\Frigo\Boeuf au Whisky.gif') Plat3 = tk.Button(root, image=photo6, width=160, height=120, relief="groove", bg="black", activebackground="white", borderwidth=0, command=com6) Plat3.place(x="210", y="340") photo7 = PhotoImage(file = '\Concepts\Image\Frigo\Opéra.gif') Dessert1 = tk.Button(root, image=photo7, width=160, height=120, relief="groove", bg="black", activebackground="white", borderwidth=0, command=com7) Dessert1.place(x="400", y="60") photo8 = PhotoImage(file = '\Concepts\Image\Frigo\Cheese cake.gif') Dessert2 = tk.Button(root, image=photo8, width=160, height=120, relief="groove", bg="black", activebackground="white", borderwidth=0, command=com8) Dessert2.place(x="400", y="200") photo9 = PhotoImage(file = '\Concepts\Image\Frigo\Forêt noire.gif') Dessert3 = tk.Button(root, image=photo9, width=160, height=120, relief="groove",bg="black", activebackground="white", borderwidth=0, command=com9) Dessert3.place(x="400", y="340") nom_im = PhotoImage(file='\Concepts\Image\Frigo\Paiement.gif') def val1(): top = tk.Toplevel(width=350, height=150) can = tk.Canvas(top, width = 377, height = 195) can.create_image(0, 0, anchor=NW, image=nom_im, tags="truc") can.pack() top.after(10000, lambda: top.destroy()) def an1(): panier.destroy() photo10 = PhotoImage(file='\Concepts\Image\Frigo\Valider1.png') BouttonV = tk.Button(root, image=photo10, width=70, height=70, relief="flat",activebackground="white", borderwidth=0, command=val1) BouttonV.place(x="600", y="390") photo11 = PhotoImage(file = '\Concepts\Image\Frigo\Annuler1.png') BouttonX = tk.Button(root, image=photo11, width=70, height=70, relief="flat",activebackground="white", borderwidth=0, command=an1) BouttonX.place(x="700", y="390") root.mainloop()