How to Build Interfaces with wxPython and FlatNotebook

In this wxPython article we want to learn How to Build Interfaces with wxPython and FlatNotebook, so FlatNotebook is custom control in the wx.lib.agw library for wxPython, which provides notebook like interface with modern flat look. it can be used to create tabs or pages that the user can switch between to display different sets of controls or information. FlatNotebook control offers different customization options such as setting background color of the tabs, color of the active tab and style of the tabs. it also supports drag and drop functionality to reorder or move tabs, and provides events to handle tab related events such as when a tab is selected or closed. 

 

 

This is the complete code for this article

In the above example we have created wx.Frame and wx.Panel. than we set the background and foreground colors of panel to give it FlatUI look. we have also set the font for the panel, text control and button. we then creates wx.TextCtrl and wx.Button, and add FlatUI style to them. we add them to a sizer and set the panel sizer to the sizer. and lastly we creates an instance of the MainFrame class and show it.

 

 

Run the code and this will be the result

How to Build Interfaces with wxPython and FlatNotebook
How to Build Interfaces with wxPython and FlatNotebook

 

 

Learn More on wxPython

Leave a Comment