Week 8 – Tooling In Tooltips

This week, I nabbed a low-hanging (but juicy!) fruit.  I implemented tooltips for all of the static UI elements…

Tooltips are just one of those little things that you tend to take for granted.  The ability to hover a mouse cursor over a UI element and get a clue as to it’s functionality does is one of the prime ways that users learn your program.  They learn not only what that specific element does; by considering it’s placement context, the meaning of nearby elements may be inferred.

In wxWidgets, adding a mouse hover tooltip is as simple as calling the SetToolTip() method on the control.  Certain control types allow you to just place the tooltip text inline in the constructor.

Sample Tooltip code

Source code for a sample tooltip…

And here is the result:

Sample wx code for a Tooltip

The tooltip in action!

Unfortunately, dynamic tooltips are going to require a lot more work.  Eventually I’d like to add dynamic tooltips to the items in the Data & Visualization panes, which would provide various kinds of information depending on what kind of element the mouse is hovering over, but this is going to have to come later.

About the Author: Justin
A 34 year old Software Engineer in Seattle, WA with a love for coding, music, video games, and the great outdoors.
Author Website: http://www.justinmangue.com

Leave a Reply

Your email address will not be published. Required fields are marked *