Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Question on ControlTip Text 4

Status
Not open for further replies.

quest4

Technical User
Aug 27, 2001
735
US
Good afternoon, in the final stages of building this dbase, I was asked to add help/instructions to it. ControlTips text "appears" to to the job that everyone seems to like, with one major draw back. I would like to have three or more sort lines of text appear, but one long line of text is all I can get so far. This is one of the shorter text examples:
Select Customer Number from the Pull-Down Menu or Enter the Customer Number. The Customer Name is automaticaly entered. Default is SPI.
That is one line of text, I would like something like this:
Select Customer Number from the Pull-Down
Menu or Enter the Customer Number. The
Customer Name is automaticaly entered.
Default is SPI.
Is there any way of forcing the line break to get this desirred appearance. As always, thank you in advance to anyone responding to this problem.
 
One way I've accomplished this is through some simple VBA coding. In the OnOpen event of the form, add some code similiar to this:
Code:
Me.YourControlName.ControlTipText = "Select Customer Number from the Pull-Down" & vbCrLf & _
"Menu or Enter the Customer Number.  The" & vbCrLf & _
"Customer Name is automaticaly entered." & vbCrLf & _
"Default is SPI."

Hoc nomen meum verum non est.
 
Thank you, CosmoKrammer, for you response. Not what I wanted to hear, but it kind of what I was expecting to hear. Can this have a 5 or 10 second delay before it appears, like the ControlTip Text does now? That only people who want to see the instructions to have to look at them. Thank you very much for the assistance.
 
It will work the same way....This is just an alternative method to setting the ControlTipText property, allowing you to use the vbCrLf constant for the CR/LF combination.

Give it a try and let us know....

Hoc nomen meum verum non est.
 
Thank you again, CosmoKrammer. I will give it a try, but I have a lot of checkboxes and textboxes that will need these, about 12 or so per page and up to six pages per form, won't the OnOpen event get a bit crowded with all of that text being entered? Also it will make it a bit hard to modify that test, finding it. Is there a better event to pick? Thanks you again for the assistnace.
 
If it will make it any easier for you, you could also use the OnLoad event....

Hoc nomen meum verum non est.
 
Thank you for getting back to me. I just experimented with it, using the Textbox's GotFocus event and it appeared to work, a little further to the right than I liked but it appeared to work. Is there any additional commands I can add to change font size and text justification? Is there any reason to use OnLoad over GotFocus? Thank you so very much for all of the help.
 
CosmoKramer, one last parting question, is there a easy way to increase the duration of the pause before the pop-up comes up? Thank you for all of your assistance.
 
AFAIK there is no way to control font properties in a ControlTip. To use GotFocus the control obviously must have the focus and I would think you would not want the tip appearing every time a control has the focus.

Also, I don't beleive the duration is configurable, but I've never needed to investigate though....

Hoc nomen meum verum non est.
 
Just to add a none code version...

In the controltip text property of the control, just enter your text and use SHIFT+Enter or CTRL+Enter where you need the linebreaks.

Roy-Vidar
 
Thank you Cosmo for the information, maove or less it was just a thought I was playing with for after people don't need to see instructions. Thanks for everything.
Thank you RoyVidar for your assistnace. I appreciate haveing an alternate method of of doing putting in instructions. This is the first time I have had to put intructions into one of my dbases. Thanks you for the assistance.
 
You could also insert the code at the Mouse Move event, and it would react the same as using Controltip under form properties.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top