Category / Section
How to add a delay before the Tooltip or HelpText popups are displayed in WinForms TreeViewAdv?
Tooltip
In WinForms TreeViewAdv , 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)
{
// Introduce any desired delay here
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