Underlining Characters in a ToolTip

June 5th, 2008 | by Jeff Fitzsimons |

My product, a toolbar for Outlook Express, uses tooltips to display keyboard shortcuts. For some localization work, I needed to display an underlined character within a tooltip.

The only hint I could find was a reference to .Net tooltips.

Apparently, in both .Net and Win32 tooltips, a single ampersand will be stripped, a double ampersand will cause the next character to be underlined, and three ampersands will display a single ampersand.

Input     Displayed
&B B
&&B B
&&&B &B

Note that this will be affected if the TTS_NOPREFIX flag is set, which prevents ampersands from being stripped.

Post a Comment