How to do it...

Create a new Python module and place the following code into this module:

GUI_tabbed.py

This creates the following GUI:

While not amazingly impressive as of yet, this widget adds another very powerful tool to our GUI design toolkit. It comes with its own limitations in the minimalist example above (for example, we can neither reposition the GUI nor does it show the entire GUI title).

While we used the grid layout manager for simpler GUIs in the previous recipes, we can use a simpler layout manager, and pack is one of them.

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

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.