PC Review
Forums
Newsgroups
Microsoft DotNet
Microsoft Dot NET Framework Forms
SetToolTip as needed
Forums
Newsgroups
Microsoft DotNet
Microsoft Dot NET Framework Forms
SetToolTip as needed
![]() |
SetToolTip as needed |
|
|
Thread Tools | Rate Thread |
|
|
#1 |
|
Guest
Posts: n/a
|
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 ? |
|
|
|
#2 |
|
Guest
Posts: n/a
|
Could you set the tool tip on the mouse enter of the control itself?
John On Thu, 2 Jun 2005 14:02:03 +0100, "JezB" <jezbroadsword@blueyonder.co.uk> wrote: >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 ? > |
|
|
|
#3 |
|
Guest
Posts: n/a
|
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 !) "J L" <john@marymonte.com> wrote in message news:uh2u919r5v53kc2bn8mosrl82e0948q886@4ax.com... > Could you set the tool tip on the mouse enter of the control itself? > > John > > On Thu, 2 Jun 2005 14:02:03 +0100, "JezB" > <jezbroadsword@blueyonder.co.uk> wrote: > >>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 ? >> > |
|
![]() |
|
| Thread Tools | |
| Rate This Thread | |
|
|

Main Page 

