I am having difficulty updating the text of a variable after login. A user must log in to the program, and then the program saves their data in a dataStore list. From here, I'm trying to update 2 labels on a seperate frame opened once the user has logged in. However they won't seem to update.
Long story short, how can I make the tkinter frame load when it is to be shown to the user rather than at the beginning. Or even how to reload everything so the functions are run again to update.
Run when Login button is pressed:
cont.show_frame(MainPanel)
MainPanel function to update labels:
def setUser(self, cont, args):
userset = self.widgets["usrLabel"].config(text='User: %s' %(DataStore.userData['username']))
(MainPanel) self.widgets:
self.widgets = {
"usrLabel" : self.create_widget(controller, ["Label", "User:", 15, 10]),
"typeLabel" : self.create_widget(controller, ["Label", "Type:", 15, 30]),
...
}