From c738293a0799282713b7f891c4df6d8a085c1d7b Mon Sep 17 00:00:00 2001 From: DAUDET Paul Date: Mon, 23 May 2022 09:30:38 +0200 Subject: [PATCH] =?UTF-8?q?modif=20tkinter=E2=98=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tKnn.py | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 tKnn.py diff --git a/tKnn.py b/tKnn.py new file mode 100644 index 0000000..f7d0799 --- /dev/null +++ b/tKnn.py @@ -0,0 +1,49 @@ +from tkinter import * +fenetre = Tk() +fenetre['bg'] = '#fd9f9f' +fenetre.geometry('300x350') +canvas1 = Canvas(fenetre) + +label1 = Label(fenetre, text="Choisissez le nombre de voisins (k) :",font = + ('calibri', 10, 'bold', 'underline'),bg ='#fd9f9f',foreground="#4c75e3") +value1 = IntVar() +entree1 = Entry(fenetre, textvariable=value1) + +label2 = Label(fenetre, text="Veuillez entrez la date (format 'aaaa-mm-jj'):",font = + ('calibri', 10, 'bold', 'underline'),bg ='#fd9f9f',foreground="#4c75e3") +value2 = IntVar() +entree2 = Entry(fenetre, textvariable=value2) + +label3 = Label(fenetre, text="Veuillez entrez la température moyenne (en °C):",font = + ('calibri', 10, 'bold', 'underline'),bg ='#fd9f9f',foreground="#4c75e3") +value3 = IntVar() +entree3 = Entry(fenetre, textvariable=value3,) + +label4 = Label(fenetre, text="Veuillez entrez la température de référence (en °C) :",font = + ('calibri', 10, 'bold', 'underline'),bg ='#fd9f9f',foreground="#4c75e3") +value4 = IntVar() +entree4 = Entry(fenetre, textvariable=value4) + +label1.grid(pady=10) +entree1.grid() + +label2.grid(pady=10) +entree2.grid() + +label3.grid(pady=10) +entree3.grid() + +label4.grid(pady=10) +entree4.grid() + +label9= Label(fenetre, text="Conso", bg="#7a817f") + +bouton1 = Button(canvas1, text="Tester",height=2,width=10 ,bg="#4e93de") +bouton1.grid(pady = 10) + +canvas1.grid() +label9.grid(pady=10) + +fenetre.title("IHM KNN") +#fenetre.iconbitmap('icon.ico') +fenetre.mainloop() \ No newline at end of file