How can I restrict my entry box input to alphabet only? I've tried many methods from online but nothing seemed to work . . .
This was the approach I thought of:
window = Tk()
entry1 = Entry(window)
entry1.pack()
def submit():
getinput = entry1.get()
try:
getinput != int(getinput)
except ValueError:
messagebox.showerror('Error', 'Letters only please')
window.bind('<Return>', lambda event: submit())
window.mainloop()
Unfortunately, this didn't work. It kind of works? But it considers alphabets an integer, I think.. Please help.