Modify ↓
Opened 18 years ago
Closed 18 years ago
#470 closed Bug (No Bug)
Displaying '&' symbol in TraySetToolTip()
| Reported by: | anonymous | Owned by: | |
|---|---|---|---|
| Milestone: | Component: | AutoIt | |
| Version: | 3.2.12.0 | Severity: | None |
| Keywords: | Cc: |
Description
Below code will only display "hi" when mouse is placed onto of the tray icon.
TraySetToolTip("hi&")
I've tried escaping the '&' symbol, which isn't necessary, but doesn't work. Is this a bug? At least I think it is.
Attachments (0)
Note:
See TracTickets
for help on using tickets.

This is not a bug. By default, Tooltip controls strip the ampersand character. You can either change the style of the tooltip to add the TTS_NOPREFIX style or you can triple the ampersand to get it to display.
TraySetToolTip("hi&&&")The reason three ampersands are required is because it's double-escaping. The first escape is to prevent the ampersand from being stripped and the second escape shows a literal ampersand instead of underlining the next letter.