title: Can't put tkinter widget inside Toplevel Frame
body: <p>I am trying to open a toplevel widget from a button press, and generate a list within that frame from an example I found.  However, when I try to place the widget within the generated frame, I get the following error:</p>
  
  <pre><code>_tkinter.TclError: can't put .!treeview inside .!errorexample.!toplevel.!mclistdemo.!frame.!frame
  </code></pre>
  
  <p>I have narrowed down the problem to </p>
  
  <p>self.tree.grid(<strong>in_=f,</strong> row=0, column=0, sticky=NSEW) </p>
  
  <p>within the _create_treeview method.  When the in_ command is removed, the widget is generated correctly in the parent window.  I suspect that the problem has something to do with my parent/self naming conventions, but I am still struggling to grasp that subject.</p>
  
  <p>Most of the questions I've run across that are described similarly seem to be a matter of trying to place the widget while generating it, but that doesn't seem to be the case in this code.</p>
  
  <pre><code>from tkinter import *
  from tkinter import ttk
  from tkinter.font import Font
  
  class ErrorExample(Frame):
  
      def __init__(self, parent):
          Frame.__init__(self,parent)
          self.grid()
          self.parent=parent
  
          self.b4=Button(
              self,
              text="Load",
              command=lambda: self.createWindow())
          self.b4.grid()
  
      def createWindow(self):
          self.t = Toplevel(self)
          MCListDemo(self)
  
  class MCListDemo(ttk.Frame):
  
      def __init__(self, parent, isapp=True):
          ttk.Frame.__init__(self, parent.t)
          self.grid()
          self.isapp = isapp
          self._create_widgets()
  
      def _create_widgets(self):
          if self.isapp:
              self._create_demo_panel()
  
      def _create_demo_panel(self):
          demoPanel = Frame(self)
          demoPanel.grid()
          self._create_treeview(demoPanel)
          self._load_data()
  
      def _create_treeview(self, parent):
          f = ttk.Frame(parent)
          f.grid()
          self.dataCols = ('country', 'capital', 'currency')        
          self.tree = ttk.Treeview(columns=self.dataCols, 
                                   show = 'headings')
          self.tree.grid(in_=f, row=0, column=0, sticky=NSEW)
  
  start=Tk()
  ErrorExample(start)
  if __name__=="__main__":
      main()
  </code></pre>