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 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67
| #!/usr/bin/env python
# -*- coding: Utf-8 -*-
from tkinter import *
from tkinter.filedialog import askopenfilename
from tkinter.messagebox import showerror
#Fenêtre
racine = Tk()
racine.title("Programme")
racine.geometry("800x400")
#Fonctions
def loadfile():
filename = askopenfilename()
return
#Zone de texte
cadre_texte = Frame(racine, width = 500, height = 100)
cadre_texte.pack()
cadre_texte.pack_propagate(False)
texte = Label(cadre_texte, text = "Sélectionnez les fichiers")
texte.pack(expand = 1, anchor = CENTER)
#Séquence de référece
frame1 = LabelFrame(racine, text = "Séquence de référence", width = 500, height = 60) #Cadre 1
frame1.pack()
frame1.pack_propagate(False)
saisie = StringVar()
chemin = Entry(frame1, textvariable = saisie, width = 30)
chemin.pack()
bouton1 = Button(frame1, text = "Parcourir", command = loadfile)
bouton1.pack()
#Coverage
frame2 = LabelFrame(racine, text = "Coverage", width = 500, height = 60) #Cadre 2
frame2.pack()
frame2.pack_propagate(False)
saisie = StringVar()
chemin = Entry(frame2, textvariable = saisie, width = 30)
chemin.pack()
bouton2 = Button(frame2, text = "Parcourir", command = loadfile)
bouton2.pack()
#Conflits
frame3 = LabelFrame(racine, text = "Conflits", width = 500, height = 60) #Cadre 3
frame3.pack()
frame3.pack_propagate(False)
saisie = StringVar()
chemin = Entry(frame3, textvariable = saisie, width = 30)
chemin.pack()
bouton3 = Button(frame3, text = "Parcourir", command = loadfile)
bouton3.pack()
#Quitter
bou_quitter = Button(racine,
text = "Quitter",
command = racine.destroy)
bou_quitter.pack(side = "right", expand = 1, anchor = "se")
racine.mainloop() |
Partager