You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
41 lines
1.1 KiB
41 lines
1.1 KiB
import tkinter as tk
|
|
|
|
|
|
#def conv () :
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
fenetre = tk.Tk()
|
|
fenetre.title("convertisseur")
|
|
canvas = tk.Canvas(fenetre, width=500, height=500, bg='white')
|
|
|
|
tk.Label(text="Convertisseur de vitesse").grid(column= 1, columnspan= 3)
|
|
|
|
value = tk.DoubleVar()
|
|
value.set("Entrez vitesse en Km/h ou Mph")
|
|
entree = tk.Entry(fenetre, textvariable=value, width=30)
|
|
entree.grid(column=1, columnspan= 3)
|
|
tk.Button (fenetre, text ='Kilomètres -> Miles', command = conv).grid(column=1,
|
|
row=2,
|
|
padx=5,
|
|
pady=5)
|
|
|
|
|
|
|
|
tk.Button (fenetre, text ='Miles -> Kilomètres', command = conv).grid(column=2,
|
|
row=2,
|
|
padx=5,
|
|
pady=5)
|
|
|
|
|
|
|
|
|
|
fenetre.mainloop()
|