title: tkinter display new frame from menu
body: <p>I'm trying to write my fisrt script in python &amp; tkinter.</p>
  
  <p>I block to display a new frame from a function (<strong>def onDisplay</strong>) when a click is made from menu bar button, but nothing append.
  No error is display :-(</p>
  
  <p>The new frame is made with dynamic checkboxes from text files:
  txt file:</p>
  
  <pre><code>item1
  item2
  ...
  item100
  </code></pre>
  
  <p>A screen of the GUI:</p>
  
  <p><a href="https://i.stack.imgur.com/fox4n.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/fox4n.jpg" alt="enter image description here"></a></p>
  
  <p>Here my code:</p>
  
  <pre><code>from tkinter import Tk, Frame, Menu, Checkbutton, Text, TOP, BOTH, X, N, LEFT, BooleanVar
  from tkinter.ttk import Frame, Label, Entry
  import glob
  
  class Example(Frame):
  
      def __init__(self):
          super().__init__()
  
          self.initUI()
          #self.display_srv()
  
      def initUI(self):
  
          self.master.title("Submenu")
  
          menubar = Menu(self.master)
          self.master.config(menu=menubar)
  
          fileMenu = Menu(menubar)
  
          submenu = Menu(fileMenu)
          submenu.add_command(label="lst1", command=self.onDisplay)
          submenu.add_command(label="lst2")
          submenu.add_command(label="lst3")
          fileMenu.add_cascade(label='Listing', menu=submenu, underline=0)
  
          fileMenu.add_separator()
  
          fileMenu.add_command(label="Exit", underline=0, command=self.onExit)
          menubar.add_cascade(label="File", underline=0, menu=fileMenu)
  
      #The frame i tried to display
      def onDisplay(self):
          self.master.title("display it")
          self.pack(fill=BOTH, expand=True)
          frame1 = Frame(self)
          frame1.pack(fill=X)
          path = '/root/liste/*.txt'
          files=glob.glob(path)
          count = 0
          for file in files:
              with open(file, 'r') as lst_file:
                  for item in lst_file:
                      # Need to split all item by 10
                      Checkbutton(self, text=item.rstrip()).grid(row=count//10, column=count%10)
                      count += 1
  
  
      def onClick(self):
          if self.var.get() == True:
              self.master.title("Checkbutton")
          else:
              self.master.title("")
  
      def onExit(self):
  
          self.quit()
  
  
  def main():
  
      root = Tk()
      root.geometry("850x550+300+300")
      app = Example()
      root.mainloop()
  
  
  if __name__ == '__main__':
  </code></pre>
  
  <p>Many thanks for any help</p>
  
  <p>Regards,</p>