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 36
|
from tkinter import *
from modifier import *
class Application(Tk):
"""Fenêtre principale de l'application"""
def __init__(self):
Tk.__init__(self)
self.resizable(width=False, height=False)
self.title("EvalComp")
self.frame_choix = Frame(self,bg="green",width=800,height=300)
varmenu= IntVar()
self.frame_boutons2 = Frame(self)
Radiobutton(self.frame_boutons2, text="Options",variable=varmenu, value=1,indicatoron=0,bd=5).pack(side=LEFT,fill=X)
Radiobutton(self.frame_boutons2, text="Quitter",variable=varmenu,value=2,indicatoron=0,bd=5, command=self.destroy).pack(side=LEFT,fill=X,expand=YES)
Radiobutton(self.frame_boutons2, text="Imprimer",variable=varmenu,value=3,indicatoron=0,bd=5).pack(side=LEFT,fill=X)
self.frame_boutons2.pack(side=BOTTOM,fill=X)
self.frame_boutons1 = Frame(self)
Radiobutton(self.frame_boutons1, text="Modifier des informations",variable=varmenu,value=4,indicatoron=0,bd=5,command=self.modifier).pack(side=LEFT,fill=X,expand=YES)
Radiobutton(self.frame_boutons1, text="Créer un sujet",variable=varmenu,value=5,indicatoron=0,bd=5).pack(side=LEFT,fill=X,expand=YES)
Radiobutton(self.frame_boutons1, text="Enregistrer des résultats",variable=varmenu,value=6,bd=5,indicatoron=0).pack(side=LEFT,fill=X,expand=YES)
Radiobutton(self.frame_boutons1, text="Afficher des résultats",variable=varmenu,value=7,bd=5,indicatoron=0).pack(side=LEFT,fill=X,expand=YES)
self.frame_boutons1.pack(side=BOTTOM,fill=X)
self.frame_choix.pack(side=BOTTOM,fill=BOTH,expand=YES)
def modifier(self):
f_modifier = Fenetre_modifier(master=self.frame_choix)
f_modifier.pack(side=TOP,fill=BOTH,expand=YES)
if __name__ == '__main__':
fenetre=Application()
fenetre.mainloop() |
Partager