Tkinter Entry Widget Not Updating
I've searched everywhere on the web but unfortunately no where did I find an answer to this question: after setting a tkinter Entry() widget's textvariable to a textvariable. the
Solution 1:
A textvariable associated with an Entry should be a StringVar(). I don't se any such declaration in your code.
self.save_file_name = StringVar()
To set and get the value of a StringVar() you must use the set() or get() method, eg.
defsaveFileName(self):
if(self.save_file_name.get() != ""):
self.window.destroy()
# etc, etc.Also, don't create more than one instance of Tk() as in:
defaskForFilename(self):
self.window = tk.Tk()
Use Toplevel() instead. Or even better: use the tkinter filedialogs.
Post a Comment for "Tkinter Entry Widget Not Updating"