The Power of Open Source
I’m just giving the finishing touches to my wxWidgets + SQLite + CppUnit personal project, all written in standard C++, and compiling in Mac, Windows and Linux as well. And I had the opportunity to see how good is to be able to change the source code of a library when you need it.
The problem was that the wxCalendarCtrl control that comes with wxWidgets 2.6.3 (see note below) did not render properly on Windows. In all the other platforms it looked OK, but in Windows it just looked like this:
But… since wxWidgets is open-source, I just opened the src\generic\calctrl.cpp
file and looked inside to see how the whole thing was built: I found that the size of the spinner depends on that of the months wxComboBox control, and then what I did is just to force the size of the combo box to a fixed size of 100 pixels, instead of the default value “wxDefaultCoord” (I did the change in line 275, in the constructor of the wxComboBox called “m_comboMonth”).
I rebuilt the library, and then I rebuilt my own project linking to the patched code:
Note: By the way, I’m using version 2.6.3 since I want the code to compile under Mac OS X 10.2 “Jaguar” as well (as far as I saw, 2.7 is not compatible with Jaguar any more). I will post more screenshots, as well as the whole source code, very soon!