The AuiFrameManager
is part of the Advanced User Interface (wx.aui
) library added to wxPython in 2.8. It allows a Frame to have a very user customizable interface. It automatically manages children windows in panes that can be undocked and turned into separate floating windows. There are also some built-in features to help with persisting and restoring the window's layout during running the application. This recipe will create a Frame base class that has AUI support and will automatically save its perspective and reload it when the application is next launched.
The following code will define a base class that encapsulates some of the usage of an AuiManager
:
import wx import wx.aui as aui class AuiBaseFrame(wx.Frame): """Frame base class with builtin AUI support""" def __init__(self, parent, *args, **kwargs): super(AuiBaseFrame, self).__init__(*args, **kwargs) # Attributes auiFlags = aui.AUI_MGR_DEFAULT if wx...