Windows Develop Bookmark and Share   
 index > Windows Forms General > ToolTip isn't displayed if the focus is inside a TextBox
 

ToolTip isn't displayed if the focus is inside a TextBox

hi,

If I set a ToolTip for a TextBox, then in runtime after clicking inside the TextBox, the tooltip isn't displayed anymore.

It's easily reproducable - just create a win forms app,drop a TextBox and a ToolTip, set the TextBox's "ToolTip on ..." text to some text, and run. If you click the TextBox, the ToolTip doesn't work anymore.

Another thing -I wanted to force a ToolTip to be displayed in response to a key press of a text box (with something like "An invalid key was pressed"). I use the ToolTip's Show() method. However - if the ToolTip's IsBalloon = true, then if the mouse's cursor is within the TextBox, sometimes the toolTip isn't displayed at all (after calling Show) and sometimes it's displayed in weird locations.

Is there a workaround to the 2 above?

thanks

Eran Levy  Wednesday, May 16, 2007 1:40 PM
I'm not sure about the (default) behaviour of tooltip and their appearance...

To me it seems that an ErrorProvider control is more suitable for notifying the user about invalid data though...
timvw  Wednesday, May 16, 2007 2:17 PM
btw,I'm using.net 2 on WindowsXP (default xp theme)
Eran Levy  Wednesday, May 16, 2007 1:44 PM
I'm not sure about the (default) behaviour of tooltip and their appearance...

To me it seems that an ErrorProvider control is more suitable for notifying the user about invalid data though...
timvw  Wednesday, May 16, 2007 2:17 PM

You can use google to search for other answers

Custom Search

More Threads

• Help with my two controls
• Quick question about color properties selectors in vs2008 forms designer
• ComboBox dropdownwidth in DataGridView Control
• { URGENT } - DesignSurface style of moving/resizing user controls at runtime
• Destructor code for user control with user controls on it
• Problem with GDI+
• Ellipsis at design time on a winform - possible ?
• Tab Control Style?
• Update from DataGridView
• call window login dialog in window form