wxPython is a wrapper around the wxWidgets C++ framework. This relationship means that inside most wxPython objects there is a C++ object. Because of this, methods that belong to wxPython classes cannot always be overridden in the same way as they can with a normal Python object.
To demonstrate this behavior, this recipe will show how to create a class that will automatically add its children windows to its
Sizer layout. This will be contrasted to a class that does not expose its virtual methods to the Python layer of the class.
To demonstrate the difference in overriding methods, we will create two similar classes first starting with one that derives from the standard
import wx class ...