Modify

#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:1 by BrewManNH, on Jan 16, 2015 at 9:28:19 PM

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.

comment:2 by guinness, 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 water, 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 guinness, 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/.

Last edited on Jan 18, 2015 at 7:10:17 PM by guinness (previous) (diff)

comment:5 by BrewManNH, on Jan 28, 2016 at 9:28:53 PM

Resolution: No Bug
Status: newclosed

According to a post by Jos this is intended behavior for using CHR(0) or Null in a tooltip.

You can find the post here

Modify Ticket

Action
as closed The ticket will remain with no owner.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.