Showing posts with label wxWidgets. Show all posts
Showing posts with label wxWidgets. Show all posts

Wednesday, April 09, 2008

Me and C++, a love/hate relationship

It is not something new. It has always been like that. These last two days were just another example of this. Yesterday, I was cursing C++. I have been fighting to solve some major memory leaks on my code... and it was hard... I hate C++!!! Today I finally finished solving that problem and moved forward. Moved to a completely different issue. In this I apply the flexibility and power of C++ to implement an algorithm that can be compiled using only standard libraries or using wxWidgets (and taking advantage of it). The most beautiful point is that I did it in just a couple of hours and the only thing I now have to do, if I want to switch, is change a single line of code. Indeed, I love C++!!!

Tuesday, March 06, 2007

No help text in wxWidgets Status Bar

I am writing an application in C++ and I'm using wxWidgets. The application user interface includes a toolbar and a status bar. Automatically wxWidgets assumes that I want to see the help text for toolbar buttons (or for menu items) in the first field of status bar. Even if I have no hint text specified it clears the respective field of the status bar.

After a few hours trying to overcome this "problem" (or "feature", if you prefer), I found the solution after carefully reading the manual. It is not necessary to override the wxEVT_TOOL_ENTER, as I was trying to do, although it can be done this way.

The solution is incredibly simple. I just need to call SetStatusBarPane(-1) for the corresponding frame. This disables help display in the status bar.