1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
| # -*- coding: cp1252 -*-
from Tkinter import *
# Création de la fenêtre principale (main window)
Mafenetre = Tk()
Mafenetre.title("Jeu questions réponses")
# Création de boutons pour les questions
Button(Mafenetre,text="question1",command=Mafenetre.destroy).grid(row=1,padx=30,pady=30)
Button(Mafenetre,text="question2",command=Mafenetre.destroy).grid(row=2,padx=30,pady=30)
Button(Mafenetre,text="question3",command=Mafenetre.destroy).grid(row=3,padx=30,pady=30)
Button(Mafenetre,text="question4",command=Mafenetre.destroy).grid(row=4, padx=30,pady=30)
Button(Mafenetre,text="question 5",command=Mafenetre.destroy).grid(row=5,padx=30,pady=30)
Button(Mafenetre,text="question 6",command=Mafenetre.destroy).grid(row=6,padx=30,pady=30)
Button(Mafenetre,text="question 7",command=Mafenetre.destroy).grid(row=7,padx=30,pady=30)
Button(Mafenetre,text="question 8",command=Mafenetre.destroy).grid(row=8,padx=30,pady=30)
Button(Mafenetre,text="question 9",command=Mafenetre.destroy).grid(row=9,padx=30,pady=30)
Button(Mafenetre,text="question 10",command=Mafenetre.destroy).grid(row=10,padx=30,pady=30)
#Création de boutons pour les réponses
Button(Mafenetre,text="réponse1",command=Mafenetre.destroy).grid(row=1,column=4)
Button(Mafenetre,text="réponse2",command=Mafenetre.destroy).grid(row=2,column=4)
Button(Mafenetre,text="réponse3",command=Mafenetre.destroy).grid(row=3,column=4)
Button(Mafenetre,text="réponse4",command=Mafenetre.destroy).grid(row=4,column=4)
Button(Mafenetre,text="réponse 5",command=Mafenetre.destroy).grid(row=5,column=4)
Button(Mafenetre,text="réponse 6",command=Mafenetre.destroy).grid(row=6,column=4)
Button(Mafenetre,text="réponse 7",command=Mafenetre.destroy).grid(row=7,column=4)
Button(Mafenetre,text="réponse 8",command=Mafenetre.destroy).grid(row=8,column=4)
Button(Mafenetre,text="réponse 9",command=Mafenetre.destroy).grid(row=9,column=4)
Button(Mafenetre,text="réponse 10",command=Mafenetre.destroy).grid(row=10,column=4)
Mafenetre.mainloop() |
Partager