Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Detect if Tooltip is shown?

I am manually displaying a System.Windows.Forms.Tooltip on a control using the show method, but how can I detect if a tooltip is currently shown?

If I need to change the method for showing it to find out, that is fine.

like image 432
Robert MacLean Avatar asked Jun 02 '09 13:06

Robert MacLean


1 Answers

You could try ToolTip.GetToolTip(control), and check if the returned value is not an empty string, like this:

if (!string.IsNullOrEmpty(myToolTip.GetToolTip(myControl)))
{
    // Victory!
}
like image 113
Tommy Carlier Avatar answered Sep 18 '22 23:09

Tommy Carlier