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
| from Tkinter import *
def affiche():
liste=ent1.get()
label4= Label(fen,text=liste)
label4.pack()
def entrer():
for w in fen.winfo_children():
w.destroy()
fen.pack_propagate(0)
lab3 = Label(fen, fg='black', text= "Saisie des donnees\n\n", font=("arial", 12, "bold italic"))
lab3.pack(side=TOP)
lb1= Label(fen, text= "Entrez vos donnees:")
lb1.pack()
ent1=Entry(fen, width= 5)
ent1.pack()
bouton=Button(fen, text= "affiche",command=affiche)
bouton.place(x=175,y=150)
#~ bouton= Button(fen, text= "afficher",command=affiche_verif)
#~ bouton.place(x=175,y=250)
bouton= Button(fen, text= "Quitter", command=fen.quit )
bouton.place(x=180,y=350)
fen.mainloop()
fen= Tk()
fen.title('Logiciel de saisie de donnees')
lab2 = Label(fen,width=10,height=5, fg='red', text= "Bienvenue", font=("arial", 50, "bold italic"))
lab2.pack(side=TOP)
bouton= Button(fen, text= "Quitter", command=fen.quit )
bouton.pack(side=RIGHT)
bouton2= Button(fen, text= "Entrer", command=entrer)
bouton2.pack(side=LEFT)
fen.mainloop() |
Partager