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.