Articles in this section
Category / Section

How to introduce a delay before the WinForms TreeViewAdv's Tooltip or HelpText popups are displayed?

1 min read

Tooltip

You could achieve this feature by getting hold of the ToolTipControl and HelpTextControl associated with the TreeViewAdv, and handling their BeforePopup events as shown below:

C#

this.treeViewAdv1.ToolTipControl.BeforePopup += new CancelEventHandler (TooltipBeforePopup_EventHandler);
this.treeViewAdv1.HelpTextControl.BeforePopup += new CancelEventHandler (TooltipBeforePopup_EventHandler);
private void TooltipBeforePopup_EventHandler (object sender, CancelEventArgs e)
{
   Thread.Sleep(delay);
}

VB

Me.treeViewAdv1.ToolTipControl.BeforePopup += New CancelEventHandler (TooltipBeforePopup_EventHandler)
Me.treeViewAdv1.HelpTextControl.BeforePopup += New CancelEventHandler (TooltipBeforePopup_EventHandler)
Private Sub TooltipBeforePopup_EventHandler(ByVal sender As Object, ByVal e As CancelEventArgs)
' Introduce any desired delay here
    Thread.Sleep(delay)
End Sub

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please sign in to leave a comment
Access denied
Access denied