title: AttributeError: type object 'class' has no attribute 'method'
body: <p>Keep getting the error, <code>AttributeError: type object 'SampleApp' has no attribute 'draw'</code>. I looked at other resources for this question and seen none where the method was trying to be called from another class. I have also tried <code>def draw()</code> inside and outside the <code>_init_</code>. 
  The purpose of this is that on class B there will be input for the user, and when the button is hit widgets will be drawn to the frame on the Sample App, but so far I can't do that. </p>
  
  <pre><code>import tkinter as tk
  
  class SampleApp(tk.Tk):
  
  
      def show_frame(self, page_name):
          frame = self.frames[page_name]
          frame.tkraise()
  
      def __init__(self, *args, **kwargs):
          tk.Tk.__init__(self, *args, **kwargs)
  
  
          self.left_frame = tk.Frame(self, width=426, height=600)
          self.left_frame.grid(column=0, row=3, columnspan=3, rowspan=10)
  
          self.right_frame = tk.Frame(self, width=855, borderwidth=2, 
          relief="solid")
          self.right_frame.grid(column=4, row=0, rowspan=9, sticky="nsew")
  
  
          self.frames = {}
          for F in (A, B):
              page_name = F.__name__
              frame = F(parent=self.left_frame, controller=self)
              frame.configure(width=426, height=511, borderwidth=2, 
              relief="solid")
              self.frames[page_name] = frame
              frame.grid(row=0, column=0, columnspan=3, 
              rowspan=2,sticky="nsew")
  
          self.show_frame("A")
  
  
          def draw():
              print("We")
              label = tk.Label(self.left_frame_bottom, text="Hello")
              label.pack()
  
  
  class A(tk.Frame):
  
      def __init__(self, parent, controller):
          tk.Frame.__init__(self, parent)
          self.controller = controller
          button = tk.Button(self, text="Go to the start page",
                         command=lambda: controller.show_frame("B"))
          button.pack()
  
   class B(tk.Frame):
  
       def __init__(self, parent, controller):
           tk.Frame.__init__(self, parent)
           self.controller = controller
  
  
           submit_button = tk.Button(self, text="Submit", 
           command=lambda:SampleApp.draw())
           submit_button.place(x=180, y=320)
  
  
  if __name__ == "__main__":
      app = SampleApp()
      app.mainloop()
  </code></pre>