How to do it...

Add the following code to our GUI in the create_widgets() method towards the bottom where we created Tab Control 2. The parent of the new widget frame is tab2, which we created at the very beginning of the create_widgets() method. As long as you place the following code physically below the creation of tab2, it will work:

    ###########################################################     def create_widgets(self):         # Create Tab Control        tabControl = ttk.Notebook(self.win)           # Add a second tab        tab2 = ttk.Frame(tabControl)                   # Make second tab visible        tabControl.add(tab2, text='Tab 2')         # Create Manage Files Frame      mngFilesFrame = ttk.LabelFrame(tab2, text=' Manage Files: ')  mngFilesFrame.grid(column=0, row=1, sticky='WE', padx=10, pady=5) ...

Get Python GUI Programming Cookbook - Second Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.