Currently I'm using Python tkinter to build a GUI that require user to enter the detail into the textbox(txt3)
How do I validate if the textbox is entered. If not entered, should show message "please enter textbox" . If entered, it will go through SaveInDB() to save in database.
def SaveInDB():
subID=(txt3.get())
if not (subID is None):
...my code here to save to db
else:
res = "Please enter textbox"
message.configure(text= res)`
txt3 = tk.Entry(window,width=20)
txt3.place(x=1100, y=200)
saveBtn = tk.Button(window, text="Save", command=SaveInDB ,width=20 )
saveBtn .place(x=900, y=300)
This code above does not work for me..Please help


