title: Why does ttk.Button appears in the main window instead of tk.Toplevel?
body: <p>I have a main UI which gets instantiated like this:</p>
  
  <pre><code>class MyApp(ttk.Frame):
      def __init__(self, master):
          ttk.Frame.__init__(self, master)
          (...)
  
      def make_gui(self):
          (...)
          self.helpButt = ttk.Button(self.InnerRightFrm2, padding=(0, 0),
                                     text='Help', image=help_icon
                                     compound='left', command=self.show_help)
          (...)
  
  def main():
      root = tk.Tk()
      root.title('Myapp')
      root.columnconfigure(0, weight=1)
      root.rowconfigure(0, weight=1)
      root.resizable(True, True)
      root.update()
      gui = MyApp(root)
      gui.mainloop()
  </code></pre>
  
  <p>When a user clicks <code>Show help</code> button located on the main interface a new <code>Toplevel</code> window should appear. The <code>Toplevel</code> of this window contains two frames: <code>topFrame0</code> on <code>row=0</code> and <code>topFrame1</code> on <code>row=1</code>. I create a third frame inside <code>topFrame1</code> to put "Close" Button in in. Here is how I do it:</p>
  
  <pre><code>def show_help():
      top_win = tk.Toplevel()
      top_win.title('Help')
      top_win.resizable(0, 0)
  
      topFrame0 = ttk.Frame(top_win, borderwidth=2, relief='groove')
      topFrame0.grid(row=0, column=0, sticky='nsew')
      topFrame1 = ttk.Frame(top_win, borderwidth=2, relief='flat')
      topFrame1.grid(row=1, column=0, sticky='nsew')
      buttonFrame = ttk.Frame(topFrame1, borderwidth=2, relief='groove').grid()
      ttk.Button(buttonFrame, padding=(0, 2), text='Close', command=top_win.destroy).grid(sticky='e')
  </code></pre>
  
  <p>However, instead of appearing in the right botton of <code>Toplevel</code> window (notice red arrow in the screenshot), "Close" Button appears in the right bottom of the main <code>MyApp</code> window! How can this even happen?  </p>
  
  <p><a href="https://i.stack.imgur.com/xatIo.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/xatIo.png" alt="enter image description here"></a></p>