When generating code for a given class, wxGlade will generate code corresponding to the first time it sees a given class name. This can lead to basically empty classes if you define your application frame first and it incorporates an application-specific window class. If you then later define the application-specific window class as an outer level panel – say for reuse, you will not get the generated python code. For example:

MyAppFrame
        panel in MyAppFrame of class CustomPanel
CustomPanel
        theButton

The python code generated for Custom panel will not contain code for ‘theButton.’ The solution is to move the definition of your custom classes ahead of any classes that reference them:
CustomPanel
      theButton
MyAppFrame
     panel in MyAppFrame of class CustomPanel

Would generate code for CustomPanel that has the ‘theButton‘ present as desired.