Jump to content
Sign in to follow this  
au3scr

How to destroy tooltip?

Recommended Posts

au3scr

Hi does anyone know how to automatically destroy a ToolTip after X seconds?

I want make my program show ToolTip for 5 secs and then delete it, and I also want then script can continue working normally while it is displaying tooltip for 5 secs.I also looked help, and I didnt find timeout paremeter for tooltip :S

How I could do that?


Share this post


Link to post
Share on other sites
ChrisL
MaximusCZ

Since I stumbled upon this thread after 10 years and there is still no valid response, I present my solution, for whomever might come looking for solution after me.

To Show ToolTip for desired time, while the script continues in the meantime, I define custom tooltip function wrapper:

Func _ToolTip($msg = "", $timeout = 1000)
    ToolTip($msg)
    AdlibRegister(_ToolTipStop, $timeout)
EndFunc
Func _ToolTipStop()
    ToolTip("")
    AdlibUnRegister(_ToolTipStop)
EndFunc

This destroys the tooltip after set timeout. Note that here I use timeout as second argument, if you wish to display the tooltip on specified location, you have to add those parameters.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×