PC Review Forums Newsgroups Microsoft DotNet Microsoft Dot NET Framework Forms SetToolTip as needed

Reply

SetToolTip as needed

 
Thread Tools Rate Thread
Old 02-06-2005, 02:02 PM   #1
JezB
Guest
 
Posts: n/a
Default SetToolTip as needed


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 ?


  Reply With Quote
Old 02-06-2005, 02:32 PM   #2
J L
Guest
 
Posts: n/a
Default Re: SetToolTip as needed

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 ?
>


  Reply With Quote
Old 02-06-2005, 02:39 PM   #3
JezB
Guest
 
Posts: n/a
Default Re: SetToolTip as needed

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 ?
>>

>



  Reply With Quote
Reply



Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off