from tkinter import * root = Tk() text = Text(root) root.title("Birthday Saver") root.geometry("480x220+0+0") root.configure(bg='#2e2e2e') root.iconbitmap('C:\\Users\\Zeany\\PycharmProjects\\cake.ico') def save(): with open ('testw.txt', 'a') as f: f.write(f'name = {entry_box1.get()}') heading = Label(root,text="BIRTHDAY SAVER BY ZEANY", font=("calibri", 12, "bold"), bg="#2e2e2e", fg="#696969").pack() label1 = Label(root, text="NAME ", font=("calibri", 17, "bold"), bg="#2e2e2e", fg="#f0e6e6").place(x=20, y=27) name = StringVar() entry_box1 = Entry(root, textvariable=name, width=15, bg="#3b3b3b", fg="#ededed", borderwidth=2, relief=RIDGE).place(x=90, y=35) label2 = Label(root, text="DATE ", font=("calibri", 15, "bold"), bg="#2e2e2e", fg="#f0e6e6").place(x=20, y=55) label6 = Label(root, text="DD", font=("calibri", 8, "italic"), bg="#2e2e2e", fg="#7a7a7a").place(x=87, y=76) label7 = Label(root, text="MM", font=("calibri", 8, "italic"), bg="#2e2e2e", fg="#7a7a7a").place(x=119, y=76) label8 = Label(root, text="YEAR", font=("calibri", 8, "italic"), bg="#2e2e2e", fg="#7a7a7a").place(x=156, y=76) day = StringVar() entry_box2 = Entry(root, textvariable=day, width=2, bg="#3b3b3b", fg="#ededed", borderwidth=2, relief=RIDGE).place(x=90, y=60) label3 = Label(root, text="/", font=("arial", 14, "italic",), bg="#2e2e2e", fg="#8c8c8c").place(x=108, y=56) month = StringVar() entry_box3 = Entry(root, textvariable=month, width=2, bg="#3b3b3b", fg="#ededed", borderwidth=2, relief=RIDGE).place(x=123, y=60) label4 = Label(root, text="/", font=("arial", 14, "italic"), bg="#2e2e2e", fg="#8c8c8c").place(x=142, y=56) year = StringVar() entry_box4 = Entry(root, textvariable=year, width=4, bg="#3b3b3b", fg="#ededed", borderwidth=2, relief=RIDGE).place(x=156, y=60) label5 = Label(root, text="COMMENT ", font=("calibri", 10, "bold"), bg="#2e2e2e", fg="#f0e6e6").place(x=20, y=98) comment = StringVar() entry_box5 = Entry(root, textvariable=comment, width=25, bg="#3b3b3b", fg="#ededed", borderwidth=2, relief=RIDGE).place(x=90, y=100) save_btn = PhotoImage(file='C:\\Users\\Zeany\\PycharmProjects\\save.png') img_label = Label(image=save_btn) save = Button(root, image=save_btn, width=78, height=38, bg="darkgray", command=save, borderwidth=0).place(x=22, y=160) my_label = Label(root, text='') my_label.place(x=1920, y=300) # print("name = "+ str(name.get())) # print("day = "+ str(day.get())) # print("month = "+ str(month.get())) # print("year = "+ str(year.get())) # print("comment = "+ str(comment.get())) root.mainloop()