Display ToolTip on TextBox

E

escristian

(Created on VS2003 using C#)

I have derived the TextBox control to create my own control that does a
lot of filtering and autocorrection of user input. I want to be able to
give feedback to the user when there's a problem the input he's trying
to do. A good example is in Windows XP if you go to windows explorer
and in the folders view try to rename a directory with "\", this will
result in a arrow tooltip to display saying that certain characters are
forbidden.

I was thinking of adding a ToolTop control to my TextBox control (yes I
know it's wasteful, but I could work something so they all use the same
tooltip, that I will work on later). Now in 2003 there's no .Show(...)
method for the ToolTip control, and I don't think my company is gonig
to migrate to 2005 before this week, when I have to release the
software.

Has anyone beem able to show the tooltip programatically without
waiting for the user to do a hover?

Thanks
 
B

Bruce Wood

(Created on VS2003 using C#)

I have derived the TextBox control to create my own control that does a
lot of filtering and autocorrection of user input. I want to be able to
give feedback to the user when there's a problem the input he's trying
to do. A good example is in Windows XP if you go to windows explorer
and in the folders view try to rename a directory with "\", this will
result in a arrow tooltip to display saying that certain characters are
forbidden.

I was thinking of adding a ToolTop control to my TextBox control (yes I
know it's wasteful, but I could work something so they all use the same
tooltip, that I will work on later). Now in 2003 there's no .Show(...)
method for the ToolTip control, and I don't think my company is gonig
to migrate to 2005 before this week, when I have to release the
software.

Has anyone beem able to show the tooltip programatically without
waiting for the user to do a hover?

First of all, I have to compliment you on a great post. You outlined
the background of the problem, your proposed solution, and then asked
for help. So many people here just post that last question and then
wonder why nobody answers or the answers don't apply.

I've never tried what you're trying, but I had the same problem and
solved it a different way. I added an ErrorProvider to my TextBox, and
set the ErrorProvider text. This shows a red icon beside the text box
and, when the user hovers over the icon, shows the message as a
tooltip.

Not exactly what you're after, but an alternative....
 

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