Advertisement
Guest User

Untitled

a guest
Apr 7th, 2020
198
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.86 KB | None | 0 0
  1. fen =Tk()
  2. fen.title('Sélection des mini-jeux')
  3.  
  4.  
  5. def lol():
  6.    fen.destroy()
  7.    dessin=Canvas(fen, bg="white", width=301, height=301)
  8.    dessin.grid(row = 1, column = 0, columnspan = 2, padx=5, pady=5)
  9.  
  10.  
  11.  
  12. SpaceInvimage=PhotoImage(file='invader.gif')
  13. morpionimage=PhotoImage(file='morpion.gif' )
  14.  
  15. dessin=Canvas(fen, bg="white", width=301, height=501)
  16. dessin.grid(row = 0, column = 0, columnspan = 2, padx=5, pady=5)
  17.  
  18.  
  19. bouton_minijeux = Button(fen, image=morpionimage, command=lol)
  20. bouton_minijeux.grid(row = 0, column = 0, padx=20, pady = 50, sticky=N+W)
  21.  
  22. bouton_minijeux = Button(fen, image=SpaceInvimage, command=fen.destroy)
  23. bouton_minijeux.grid(row = 0, column = 1, padx=20, pady = 50, sticky=N+E)
  24.  
  25.  
  26.  
  27. message = Label(fen, text='Sélection de mini-jeux')
  28. message.grid(row=0, column=0  , padx=3 , columnspan=2, pady=3, sticky=N  )
  29.  
  30. fen.mainloop()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement