SetToolTip as needed

J

JezB

I'm trying to set the tooltip text for various controls at the time it's
needed (rather than being set during form startup). I'm subscribing to the
ToolTip control's Popup event and setting the tooltip text for the
associated control. Something like :-

private void acToolTip_Popup(object sender, PopupEventArgs e)
{
Control ac = e.AssociatedControl;
string tooltiptext = .... (etc) (etc) ;
acToolTip.SetToolTip(ac, tooltiptext);
acToolTip.Active = true;
}

Problem is, the tooltip text that is actually showing is the text set the
LAST TIME it was set, not this time, so I have to leave the control and go
back in again to see the text that was configured this time, if that makes
sense to anyone.

What can I do ?
 
J

JezB

It's possible, but then this would be fired when the user is simply moving
the mouse around on the screen, my main problem is it involves a bit of work
to configure the text to display. I have a long tooltip delay so that it's
only evaluated only when really needed (the user is waiting for the text
anyway so won't mind the additional 1/10th of a second it takes to configure
the text !)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top