title: Open a new frame so it changes and displays a new page
body: <p>I am trying to create a login page, when the user clicks the login button it is supposed to display a new page (not Toplevel, and create a new window), but it doesn't seem to work.</p>
  <pre><code>root = Tk()
  
  root.geometry('670x466')
  
  accounts = []
  
  
  class Goode_brothers:
  
  def __init__(self, parent):
  
      self.myFrame = Frame(parent)
      self.myFrame.pack()
  
  
      self.load = Image.open('new-dip-project\\food.jpg')
      self.render = ImageTk.PhotoImage(self.load)
      self.img = Label(parent, image = self.render)
      self.img.place(x = -26, y =0)
  
      self.img_login = PhotoImage(file = 'new-dip-project\\button (3).png')
      self.b1 = Button(parent,image = self.img_login, command = self.read_info, bd = 0, bg = '#3b353b', activebackground = '#3b353b')
      self.b1.place(x = 275, y = 340)
  
  
  
      self.img_register = PhotoImage(file = 'new-dip-project\\register.png')
      self.b2 = Button(parent,image = self.img_register, command = self.openNewWindow, bd = 0, bg = '#3b353b', activebackground = '#3b353b')
      self.b2.place(x = 265, y = 400)
  
      self.canvas = Canvas(parent, width = 400, height = 120)
      self.canvas.pack()
      self.img4 = ImageTk.PhotoImage(Image.open('new-dip-project\\goode.png'))
      self.canvas.create_image(20, 20, anchor=NW, image=self.img4)
  
  
  
      self.email = Entry(parent)
      self.email.place(x = 340, y = 180)
  
      self.password = Entry(parent)
      self.password.place(x = 354, y = 250)
  
      self.img_label = PhotoImage(file = 'new-dip-project\\label-image.png')
      self.name = Label(parent, image = self.img_label, text = &quot;Email:&quot;, bg = '#3c3a3b').place(x = 197,y = 178)
  
      self.img_label_pass = PhotoImage(file = 'new-dip-project\\label_pass.png')
      self.name = Label(parent, image = self.img_label_pass, text = &quot;Password:&quot;, bg = '#3c3a3b').place(x = 177,y = 245)
  
  def openMenu(self):
  
      self.myFrame.destroy
  
      self.myFrame2 = Frame()
      self.myFrame2.pack()
  
  def read_info(self):
  
      with open(&quot;emails.txt&quot;) as read_ep:
          for line in read_ep:
              accounts.append(line.strip().split(&quot;, &quot;))
  
      credential = [self.email.get(), self.password.get()]
      if credential in accounts:
          self.openMenu()
      else:
          self.ep_notexist = Label(root, text = &quot;Your Email or Password is incorrect, Please try again&quot;, font=(&quot;open sans&quot;, &quot;8&quot;))
          self.ep_notexist.place(x = 210, y = 300)
          self.ep_notexist.after(4000, self.ep_notexist.destroy)
  </code></pre>