I have a dialog box with controls that is popped up and when a control is moused over the controls a tooltip is displayed. However, if I close the box then re-display it no tooltips will work. Here is a portion of my code. I am initializing tooltipOn when the form is loaded to null. I have done a trace and tooltip1.Show() does get called the second time it simply never displays. Any idea why?
private void Panel1_MouseMove(object sender, MouseEventArgs e)
{
Control ctrl = null;
if (sender == Panel1)
ctrl = ((Control)sender).GetChildAtPoint(e.Location);
else
ctrl = (Control)sender;
if (ctrl != null)
{
if (tooltipOn != ctrl)
{
toolTip1.Show(toolTip1.GetToolTip(ctrl), ctrl, ctrl.Width / 2, ctrl.Height / 2);
tooltipOn = ctrl;
}
}
else
{
toolTip1.Hide(this);
tooltipOn = null;
}
}