Tooltip Problems

  • Thread starter Thread starter greg
  • Start date Start date
G

greg

(reposted hopefully with proper MSDN info so I get support on this)

I'm using VS 2005.

I'm trying to use ToolTip's for some mandatory field validation. If a user
presses "OK" in my application, it will highlight any mandatory fields with a
nice baloon saying that field is mandatory.

I've got this working nicely with, say,

toolTip.Show("This field is mandatory.", tx_InputDate, 3000);


However, sometimes the tool tip appears in the wrong location. The times it
works properly, it looks great!

Is this a bug? Is there a workaround?
 
Hi,
However, sometimes the tool tip appears in the wrong location.

Do you mean that the balloon ToolTip doesn't point to the target contol for
the first time it pops up?

This is a known issue of ToolTip in VS2005. In fact, this problem doesn't
exist when the balloon ToolTip pops up for the second time. If we set the
ToolTipText property for the target control on the tooltip, this problem
doesn't exist either.

The workaround is to call the Show method of the ToolTip twice. The
following is a sample.

private void SetToolTip(ToolTipIcon icon, string title, string message)
{
_toolTip.IsBalloon = true;
_toolTip.ToolTipIcon = icon;
_toolTip.ToolTipTitle = title;
_toolTip.Show("", this.textBox1);
_toolTip.Show(message, this.textBox1);
}

Hope this helps.
If you have anything unclear, please feel free to let me know.

Sincerely,
Linda Liu
Microsoft Online Community Support

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.
 
Thanks, this workaround worked perfectly!

Linda Liu said:
Hi,


Do you mean that the balloon ToolTip doesn't point to the target contol for
the first time it pops up?

This is a known issue of ToolTip in VS2005. In fact, this problem doesn't
exist when the balloon ToolTip pops up for the second time. If we set the
ToolTipText property for the target control on the tooltip, this problem
doesn't exist either.

The workaround is to call the Show method of the ToolTip twice. The
following is a sample.

private void SetToolTip(ToolTipIcon icon, string title, string message)
{
_toolTip.IsBalloon = true;
_toolTip.ToolTipIcon = icon;
_toolTip.ToolTipTitle = title;
_toolTip.Show("", this.textBox1);
_toolTip.Show(message, this.textBox1);
}

Hope this helps.
If you have anything unclear, please feel free to let me know.

Sincerely,
Linda Liu
Microsoft Online Community Support

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.
 
Hi Greg,

You may want to consider using an ErrorProvider component instead.

Hope this helps,

/ravi
 
Back
Top