I have a code snippet. Entry widget creates itself with text, then waits seconds then destroys itself.
entry_var_temporary = tk.StringVar()
entry_var_temporary.set(varsoundTitle_usernameHeroContainer)
entry_shtname_temp=tk.Entry(canvas2,width=30,textvariable=entry_var_temporary)
entry_shtname_temp.pack()
entry_shtname_temp.focus_set()
root.update()
time.sleep(10)
entry_shtname_temp.destroy()
root.update()
I have put 10 seconds to wait, and let user to modify the text, if it wants so. But as I see, time.sleep does not let the entry widget to be modified.
How can I get around this problem?
With wait.window()
I realized I can edit text inside widget, but my problem is, it is not compulsory. So, if user doesn't put any text on it, it then after 10 sec needs to be destroyed