#2970 closed Bug (No Bug)
TraySetToolTip text set to Chr(0) hides the tooltip.
| Reported by: | guinness | Owned by: | |
|---|---|---|---|
| Milestone: | Component: | AutoIt | |
| Version: | 3.3.12.0 | Severity: | None |
| Keywords: | Cc: |
Description
If the tooltip text is set to null then the tooltip is hidden. If this isn't a bug then it will need documenting in the help file.
#NoTrayIcon
#include <MsgBoxConstants.au3>
#include <TrayConstants.au3>
Example()
Func Example()
TraySetState($TRAY_ICONSTATE_SHOW) ; Show the tray menu.
TraySetToolTip("An example of a tray menu tooltip.") ; The tray menu icon must be shown before we can set some text.
MsgBox($MB_SYSTEMMODAL, "", "Hover your mouse over the AutoIt icon to see the tooltip text set before.")
TraySetToolTip(Chr(0)) ; Hide the tooltip text by setting to null i.e. ASCII - 0.
MsgBox($MB_SYSTEMMODAL, "", "Hover your mouse over the AutoIt icon to see the tooltip is now hidden.") ; BUG
TraySetToolTip() ; Reset the tooltip to the original text i.e. the script filename.
MsgBox($MB_SYSTEMMODAL, "", "Hover your mouse over the AutoIt icon to see the tooltip is now the filename e.g. AutoIt - Example.au3")
EndFunc ;==>Example
Attachments (0)
Change History (5)
comment:2 by , on Jan 16, 2015 at 11:31:39 PM
The ticket request is just to confirm that this was the intention behaviour of null.
comment:3 by , on Jan 18, 2015 at 11:17:07 AM
TraySetToolTip("") behaves just like TraySetToolTip() and displays the default text in the tool tip.
comment:4 by , on Jan 18, 2015 at 7:06:56 PM
But "" is not the same as Chr(0) as "" is (char)32 and null is (char)0. Any further discussion should be moved to the appropriate thread please >> http://www.autoitscript.com/forum/topic/166765-traysettooltip-override-default/.
comment:5 by , on Jan 28, 2016 at 9:28:53 PM
| Resolution: | → No Bug |
|---|---|
| Status: | new → closed |
According to a post by Jos this is intended behavior for using CHR(0) or Null in a tooltip.

Isn't Null used to signify the end of a string, and you don't display the Null? So, wouldn't a string of just Null do the same thing as you're describing? Just throwing it out there.