title: Attribute in a Class is not found
body: <p>In this code:</p>
  
  <pre><code>class ButtonBox(tk.Frame):
  
      def __init__(self, parent):
          tk.Frame.__init__(self, parent)
          self.parent = parent
  
          shift = tk.Frame(self)
          shift.grid(row = 0, column = 0)
  
          shiftLabel = ttk.Label(shift, text = "Shift:")
          shiftLabel.grid(row = 0, column = 0)
          amountShift = ttk.Entry(shift, width = 5)
          amountShift.grid(row = 0, column = 1)
  
          encryptButton = ttk.Button(self, text = "Encrypt")
          encryptButton.grid(row = 0, column = 2)
  
          decryptButton = ttk.Button(self, text = "Decrypt")
          decryptButton.grid(row = 0, column = 3)
  class MainWindow(tk.Frame):
  
      def __init__(self, parent):
          tk.Frame.__init__(self, parent)
          self.parent = parent
          self.model = Model()
  
  
          self.UserIO = TextIO(self)
          self.UserIO.grid(row = 0, column = 0)
          self.Buttons = ButtonBox(self)
          self.Buttons.grid(row = 1, column = 0)
          self.Buttons.encryptButton.config(command =  self.model.encrypt)
          self.Buttons.decryptButton.config(command =  self.model.decrypt)
  
  
      def Encrypt():
          message = self.UserIO.inputString.get()
          shift = int(self.Buttons.shift.get())
          self.model.encrypt(message, shift)
  
      def Decrypt():
          message = self.UserIO.inputString.get()
          shift = int(self.Buttons.shift.get())
          self.model.decrypt(message, shift)
  
  
  root = tk.Tk()
  root.resizable(width = False, height = False)
  MainWindow(root).pack()
  root.mainloop()
  </code></pre>
  
  <p>I create a MainWindow(), and then add a command to a Button in a Button object. However, it creates an error, </p>
  
  <pre><code>Traceback (most recent call last):
    File "/home/pi/Documents/Code Projects/Caesar Cipher.py", line 120, in &lt;module&gt;
      MainWindow(root).pack()
    File "/home/pi/Documents/Code Projects/Caesar Cipher.py", line 103, in __init__
      self.Buttons.encryptButton.config(command =  self.model.encrypt)
  AttributeError: 'ButtonBox' object has no attribute 'encryptButton'
  </code></pre>
  
  <p>, why does this happen? I created a ButtonBox object, so I do not understand why this does not work.</p>