from tkinter import * root = Tk() root.resizable(False, False) text = Text(root) root.title("Birthday Saver") root.geometry("400x175+0+0") root.configure(bg='#2e2e2e') root.iconbitmap('C:\\Users\\Zeany\\PycharmProjects\\cake.ico') def save(): with open ('birthdays.txt', 'a') as f: f.write(f'name = {name.get()}\nday = {day.get()}\nmonth = {month.get()}\nyear = {year.get()}\nnote = {note.get()}\n \n') label10 = Label(root, text='', font=("calibri", 15, "bold"), bg="#2e2e2e", fg="#f0e6e6").place(x=80, y=55) def abx(): with open('birthdays.txt', 'r', ) as f: label10.config(text=read_file()) bfile = Button(root, width=8, height=2, bg="darkgray", command=abx, borderwidth=0).place(x=300, y=100) heading = Label(root,text="BIRTHDAY SAVER BY ZEANY", font=("calibri", 12, "bold"), bg="#2e2e2e", fg="#696969").pack() name = StringVar() entry_box1 = Entry(root, textvariable=name, width=15, bg="#3b3b3b", fg="#ededed", borderwidth=2, relief=RIDGE).place(x=85, y=35) label1 = Label(root, text="NAME ", font=("calibri", 17, "bold"), bg="#2e2e2e", fg="#f0e6e6").place(x=10, y=27) label2 = Label(root, text="DATE ", font=("calibri", 15, "bold"), bg="#2e2e2e", fg="#f0e6e6").place(x=10, y=55) label6 = Label(root, text="DD", font=("calibri", 8, "italic"), bg="#2e2e2e", fg="#7a7a7a").place(x=83, y=76) label7 = Label(root, text="MM", font=("calibri", 8, "italic"), bg="#2e2e2e", fg="#7a7a7a").place(x=114, y=76) label8 = Label(root, text="YEAR", font=("calibri", 8, "italic"), bg="#2e2e2e", fg="#7a7a7a").place(x=151, y=76) day = StringVar() entry_box2 = Entry(root, textvariable=day, width=2, bg="#3b3b3b", fg="#ededed", borderwidth=2, relief=RIDGE).place(x=85, y=60) label3 = Label(root, text="/", font=("arial", 14, "italic",), bg="#2e2e2e", fg="#8c8c8c").place(x=104, y=56) month = StringVar() entry_box3 = Entry(root, textvariable=month, width=2, bg="#3b3b3b", fg="#ededed", borderwidth=2, relief=RIDGE).place(x=118, y=60) label4 = Label(root, text="/", font=("arial", 14, "italic"), bg="#2e2e2e", fg="#8c8c8c").place(x=137, y=56) year = StringVar() entry_box4 = Entry(root, textvariable=year, width=4, bg="#3b3b3b", fg="#ededed", borderwidth=2, relief=RIDGE).place(x=151, y=60) label5 = Label(root, text="NOTE ", font=("calibri", 15,), bg="#2e2e2e", fg="#f0e6e6").place(x=10, y=88) note = StringVar() entry_box5 = Entry(root, textvariable=note, width=30, bg="#3b3b3b", fg="#ededed", borderwidth=2, relief=RIDGE).place(x=85, y=93) label9 = Label(root,text="(all birthdays will be saved to birthdays.txt, \ndo not change the file name to anything else.)", font=("calibri", 8,), bg="#2e2e2e", fg="#808080").place(x=95, y=138) 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=12, y=125) my_label = Label(root, text='') my_label.place(x=1920, y=1080) root.mainloop()