title: Pygubu Load new Window from UI File
body: <p>I have been looking through <em>Pygubu examples</em> trying to best understand how to achieve my goal with no success.</p>
  
  <p>I am VERY new to python, have only just started with it a few days ago. I have a number of functions that work well and accept a range of variables to do tasks but now I want to try and create a GUI to handle the inputs before firing up the functions etc.</p>
  
  <p>Because I am new to it, I thought I would try Pygubu, especially since I am using a <em>windows machine</em>. I had a look at their examples and found out how to load the <code>MainWindow</code> which I have designed.</p>
  
  <p>My main window is basically a menu system loaded from Panorama.ui, it has a few buttons which are designed to be pressed to open up other windows ("SphericalWindow", "Gigapixel_Window and "Settings").</p>
  
  <p>I have played with the callback function, and that works fine in pulling up a <code>messagebox</code>, however where I get stuck is how to call one of the other windows to be opened.</p>
  
  <p>I saw an example that talks about opening child windows at <a href="https://stackoverflow.com/questions/15306631/how-tocreate-children-windows-using-python-tkinter">How do I create child windows with Python tkinter?</a> but I am not really sure how that is translated to open a frame from within a UI file?</p>
  
  <p>How would that example, where a top-level window is created e.g. below be converted so that <code>tk.Toplevel</code> is being built from a UI file?</p>
  
  <pre><code>t = tk.Toplevel(self)
  </code></pre>
  
  <p>Thanks for any help.</p>
  
  <pre><code>import sys
  import os
  
  try:
      import tkinter as tk
      from tkinter import messagebox
  except:
      import Tkinter as tk
      import tkMessageBox as messagebox
  
  sys.path.append(os.path.join(os.path.dirname(__file__), '../'))
  
  import pygubu
  
  
  class Myapp:
      def __init__(self, master):
          self.builder = builder = pygubu.Builder()
          fpath = os.path.join(os.path.dirname(__file__),"Panorama.ui")
          builder.add_from_file(fpath)
  
          mainwindow = builder.get_object('MainWindow', master)
  
          builder.connect_callbacks(self)
  
  
      def on_Gigapixel_Click(self):
          #Callback to open window here.
  
  if __name__ == '__main__':
      root = tk.Tk()
      app = Myapp(root)
      root.mainloop()
  </code></pre>