O'Reilly logo

WxPython Application Development Cookbook by Cody Precord

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Taking control with FlatNotebook

The FlatNotebook control is a custom notebook control provided by the wx.lib module. It offers many additional basic and advanced features over the simple wx.Notebook class that is offered by the main library. For example, tabs are able to have close buttons on them along with several different visual display styles, and tabs can be dragged and reordered. As FlatNotebook is an owner-drawn control, it provides a lot more options for taking control of the behavior of your application. In this recipe, we will take a look at some of the useful features that FlatNotebook has to offer.

How to do it…

Perform the following steps:

  1. First, we will define the constructor for a subclass of FlatNotebook, as follows:
    import wx import ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required