title: how do I refresh a tkinter frames ahile using tkinter class based frames in different files
body: <p>I have a tkinter application that has multiple frames/pages in a different file and I have a main class/file which controls the navigation between those are run the application.
  Now I have to pages signup and login what I want is to pre-populate login data after sign up like username and password so for that I am storing the info in a local <code>.dat</code> file and opening it on login page but when I go back to login page its state does not change and it remains in the previous stage i.e empty entries but when I restart the application it login page picks the data from <code>.dat</code> file and then populate the entries and that just works fine I want same thing to happen when I come back from sign up page to login page but for that, I have to refresh the page/frame how could I achieve that please help me regarding this</p>
  <p>main file which controls navigation and runs the application</p>
  <pre><code>
  class tkinterApp(tk.Tk):
      def __init__(self, *args, **kwargs):
          tk.Tk.__init__(self, *args, **kwargs)
          container = tk.Frame(self)
          container.pack(side=&quot;top&quot;, fill=&quot;both&quot;, expand=True)
          self.frames = {}
          self.attributes('-fullscreen', True)
  
          for F in (startPage.StartPage, connectionPage.connect_page, loginPage.login_page, signupPage.signup_page):
              frame = F(container, self)
              self.frames[F] = frame
              frame.grid(row=0, column=0, sticky=&quot;nsew&quot;)
          self.show_frame(startPage.StartPage)
  
      def show_frame(self, cont):
          frame = self.frames[cont]
          frame.tkraise()
  
  
  if __name__ == &quot;__main__&quot;:
      app = tkinterApp()
      app.mainloop()
  
  </code></pre>
  <p>login page is like this</p>
  <pre><code>        try:
              data = pickle.load(open(&quot;Sign_up_data.dat&quot;, &quot;rb&quot;))
              if(len(data)!=0):
                  print(data)
                  username_entry.insert(0, data[&quot;username&quot;])
                  password_entry.insert(0, data[&quot;password&quot;])
          except:
              pass
          signup_button = ttk.Button(
              self, text=&quot;SIGN UP&quot;, command=lambda: controller.show_frame(signupPage.signup_page))
          signup_button.grid(row=6, column=0, padx=10, pady=10)
  
          login_button = ttk.Button(
              self, text=&quot;LOGIN&quot;, command=login_button_fuction)
          login_button.grid(row=7, column=0, padx=10, pady=10)
  
  </code></pre>
  <p>this is not a full login page just what I am doing to fetch data from <code>.dat</code> and how frames are changed.</p>