title: Getting error while achieving split screen in tkinter
body: <p>I want to get the split screen, where if i click a button in the left screen then frame should be shown in the right screen. So i used Panedwindow with 2 different frames (rightframe and leftframe). Gave buttons in the leftframe (button1 and button2). If i click the button1 then Frame1 (class Frame1) should be shown in the rightframe and if i click the button2 then Frame2 (class Frame2) should be shown in the rightframe so used raiseFrame to change the frame accordingly but getting below error if i click the button.</p>
  <pre><code>import tkinter as tk
  from tkinter import *
  from tkinter import ttk,Tk, BOTH, Menu
    
  def raiseFrame(frame):
      frame.tkraise()
  
  class Main(tk.Tk):
  
      def __init__(self):
          
          tk.Tk.__init__(self)
          
          m = PanedWindow(height=500, width=1000)
          m.pack(side=tk.RIGHT,fill = tk.Y)
  
          leftframe = Frame(m)
          m.add(leftframe)
  
          button1 =tk.Button(leftframe, text=&quot;first frame&quot;,command=lambda: raiseFrame(Frame1))                    
          button1.pack(side = tk.TOP, expand=1)
          
          button2 =tk.Button(leftframe, text=&quot;2nd frame&quot;,command=lambda: raiseFrame(Frame2))                   
          button2.pack(side = tk.TOP, expand=1)
  
  
          rightframe= Frame(m, bg=&quot;green&quot;)
          m.add(rightframe)
  
  
  class Frame1(tk.Frame):
  
      def __init__(self):
          tk.Frame.__init__(self, parent)
          
          label = tk.Label(rightframe, text=&quot;1st FRAME&quot;).pack(side = tk.LEFT,fill = tk.BOTH) 
              
  
  class Frame2(tk.Frame):
  
      def __init__(self):
          tk.Frame.__init__(self,parent)
  
          label = tk.Label(rightframe, text=&quot;2nd FRAME&quot;).pack(side = tk.LEFT,fill = tk.BOTH)
          
  app = Main()
  app.mainloop()
  </code></pre>
  <p>error:</p>
  <pre><code>Exception in Tkinter callback
  Traceback (most recent call last):
    File &quot;C:\Users\Python\Python38\lib\tkinter\__init__.py&quot;, line 1883, in __call__
      return self.func(*args)
    File &quot;C:\Users\New folder\GUI.py&quot;, line 23, in &lt;lambda&gt;
      button1 =tk.Button(leftframe, text=&quot;first frame&quot;,command=lambda: raiseFrame(Frame1))
    File &quot;C:\Users\New folder\GUI.py&quot;, line 7, in raiseFrame
      frame.tkraise()
  TypeError: tkraise() missing 1 required positional argument: 'self'
  </code></pre>
  <p>Screenshot after changes:
  <a href="https://i.stack.imgur.com/7vtY3.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/7vtY3.png" alt="enter image description here" /></a></p>