Legacy application & older wxPython Classic

Hi Robin and all,

It’s been a long time since I posted anything meaningful related to wxPython, but I still use it every day and now even more than I ever thought possible.

I’ll try and give a bit of context to my issue. My colleague and I have been (finally) given Some time to finish, polish and complete a complex, big application we have been working on on and off (mostly off) for 8 years.

The application is written in Python 2.7 and it uses wxPython Please don’t tell me to move to Python 3 or use Phoenix, we don’t have the resources nor the time for a move like that - there’s only two of us, and we are not software programmers, we’re reservoir engineers.

That said, I could really, really use one of the features of wx.FileDialog that allows you to add extra controls/widgets to the native file dialog - namely the SetExtraControlCreator method. It seems to me this method is not available in wxPython, although the wxWidgets documentation states that it is new “since 2.9.0”. I may of course be wrong and I’d be so happy to be proven wrong.

Does anyone know if there is any Classic release - as close as possible to - supporting this feature? If not available in any Classic release, how tough would it be to rebuild wxPython on Windows using MinGW and add this method?

Thank you in advance for any suggestions.


Hi Andrea,

I’m sorry to write that support for SetExtraControlCreator still hasn’t been added, although there is an old PR for it that could probably still be applied to Phoenix without too much effort. But that won’t help you with Classic.

There were some patches applied at some point that enabled building wxPython with mingw, but I don’t recall when that was in relation to I don’t think I ever tried it myself, and since I had to build the release binaries with MSVC I didn’t have much interest in mingw builds nor in keeping it working.

Sorry I couldn’t be more helpful,

Hi Robin,

Thank you for the super fast answer. I imagined it would be something like that, unfortunately. Assuming the base MSVC compiler is enough (https://www.microsoft.com/en-us/download/details.aspx?id=44266) I may try to recompile wxPython So I basically see 3 choices, none of them particularly good:

  • Somehow wrap the SetExtraControlCreator and rebuild wxPython (assuming I can find the instructions and make it work…)
  • Port the generic version of wxFileDialog from wxWidgets to Python, although it’s going to look non-native and possibly ugly
  • Force the user to make a file selection in wx.FileDialog and then splatter yet another dialog in front of her face (super annoying)

Thank you for your answer Robin.


Hmm… Sounds like another candidate for wx.lib.agw… The SplatterDialog :grin:

Seriously though, a 4th option would be to make a custom dialog based on the wx.FileCtrl. I think it was added sometime before 2.9.4. It would be non-native, and probably mostly like the generic wxFileDialog, but could be done without any porting of C++ code.