Jan-05-2020, 01:58 AM
from tkinter import * window = Tk() window.title("Application de retraite") window.geometry("640x640") label1 = Label(window,text="Entrez votre nom: ",font=("arial",15,"bold"), fg="black").place(x=20, y=200) i= StringVar() entry_box1= Entry(window, textvariable=i, bg="gray", width="15").place(x=300,y=200) label2= Label(window,text="Quelle est votre année de naissance?: ",font=("arial",15,"bold"), fg="black").place(x=20, y=300) k= IntVar() entry_box2= Entry(window, textvariable=k, bg="gray", width="15").place(x=300,y=300) label3= Label(window,text="Quel est votre revenu mensuel sur vos vingt-cinq meilleures années ?: ",font=("arial",15,"bold"), fg="black").place(x=20, y=400) revenu_moyen= IntVar() entry_box3= Entry(window, textvariable=revenu_moyen, bg="gray", width="15").place(x=300,y=400) label4= Label(window,text="Combien de trimestres avez vous cotisé ?: ",font=("arial",15,"bold"), fg="black").place(x=20, y=500) trimestre_cotisés= IntVar() entry_box4= Entry(window, textvariable=trimestre_cotisés, bg="gray", width="15").place(x=300,y=500) label5= Label(window,text="Combien avez vous d'enfants ?: ",font=("arial",15,"bold"), fg="black").place(x=20, y=600) enfants=IntVar() entry_box5 = Entry(window, textvariable=enfants, bg="gray", width="15").place(x=300,y=600) def do_it(): print(i.get(), k.get(), revenu_moyen.get(), trimestre_cotisés.get(), enfants.get()) make_it = Button(window, text="PRINT", width="18", height="9",command=do_it,bg="lightblue").place(x=500, y=470) window.mainloop()you must use .get()