×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Hyperlink Tooltip
2

Hyperlink Tooltip

Hyperlink Tooltip

(OP)
Hi,

1)When I set the property Enablehyperlink .T. in my textox, there is a tooltip shown "Ctrl + click to follow link" how can I translate this to my native lanquage?
2)How to set the background colour? Default is black, would like to have it white.

Regards,

Koen

RE: Hyperlink Tooltip

Hi Koen,

I know I have a solution for this somewhere, including an updated VFP DLL. I will look for this.
Do you know how much I can upload here? Or on foxite?

Regards,

Gerrit

RE: Hyperlink Tooltip

(OP)
Gerrit,
dont know, but you can weTransfer it to me? koenDOTpillerATgmailDOTcom
groet,
Koen

RE: Hyperlink Tooltip

You can't do that with native tooltips, but it's fairly easy to create your own tooltip class which you can customise in any way you like. Theree are also several generic tooltip classes available from various sources.

The problem with that approach is that it is only really suitable if the textbox contains a hyperlink and nothing else. The point is that you show the tip in the MouseEnter event, and hide it in the MouseLeave. But those events have no way of knowing whether the mouse is over the hyperlink at any given moment, or over the other text within the textbox.

The nXCoord and nYCoord parameters tell you where the mouse is within the form, but you would then have to translate that to coordinates relative to the textbox, and then figure out where the hyperlink begins and ends within the textbox. That could be tricky.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads

RE: Hyperlink Tooltip

(OP)
Mike,
How can I disable the default Tooltip text which comes with the EnableHyperlink?
To create my own tooltip is not a problem.
How do I set the background colour of my Textbox with EnableHyperlink to an other colour than the default black?
Regards.
Koen

RE: Hyperlink Tooltip

Koen, the only way to disable the default hyperlink tooltip is to disable tooltips for the entire form (ShowTips = .F.).

I don't understand your second question, re the background colour. I don't see a default of black in the textbox. The hyperlink's background colour is the same as the rest of the textbox. Is that not what you are seeing?

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads

RE: Hyperlink Tooltip

(OP)
Mike,
OK, will apply my own tooltip class for the whole form. The blackbackground is indeed what I see. I will throw an example/test form and upload it here.
Regards,
Koen

RE: Hyperlink Tooltip

Koen,

Just to be completely clear: You are talking about the background colour of the hyperlink? Within the edit box? Is that right.

If so, I am definitely not seeing it. Here is the form you uploaded, with a hyperlink filled in:



Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads

RE: Hyperlink Tooltip

(OP)
Mike,

Hmmm, what could be the reason that I see this?

Regards,

Koen

RE: Hyperlink Tooltip

Koen, to go back to your original question, you asked how to translate "Ctrl + click to follow link". That string is in the Foxpro resource file: VFP9xxx.DLL, where "xxx" is the language code.

So, provided you are distributing the correct DLL, the string should be translated automatically (as are all other English strings that are built into the VFP runtime).

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads

RE: Hyperlink Tooltip

I've never seen that before, Koen, and I can't reproduce it.

Does the black background only appear when the edit box contains a hyperlink? And what happens if there is other text in the box, apart from the hyperlink?

Anyone else got any ideas?

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads

RE: Hyperlink Tooltip

(OP)
Mike,
Thanks,
So for Dutch I shall have to 'hack' the VFP9EN.DLL, hmm a lot more difficult than to change any other English display into Dutch, maybe there is a .H file where I can change the wording. Let me have a look.
How about the black background? You have white and I have black. We are both using VFP9EN.DLL
Regards,
Koen

RE: Hyperlink Tooltip

You shouldn't have to hack VFP9ENU.DLL. There should be another file for Dutch strings. I don't know the name, but it should be similar to VFP9xxx.DLL. Maybe VFP9NDL.DLL (that's just a guess). If you can find it, you use the -L command-line parameter to load it at run time.

If you do decide you need to hack VFP9ENU.DLL, do so very carefully (I'm sure I didn't need to tell you that). You'll find the relevant string at offset 5EF0.

By the way, this DLL has got nothing to do with the black background. It is only concerned with character strings.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads

RE: Hyperlink Tooltip

(OP)
Mike,

There is no such file as VFP9xx for Dutch. The team made one for English, one for French, one for German and a Korean.
Only around 15mil people for Dutch, to little.
Changed the English file, no effect, suppose I have to recompile the DLL. Will further investigate.
Do you have any idea why I get this black background?

Regards,

Koen

RE: Hyperlink Tooltip

Just to add another test sample: I also see no black background. So this really must be something about your system and I'd look into Windows settings and version and for example themes more than into anything VFP related.

I neither get a black editbox background nor black tooltip.

Re4garding the language resources, there also is Chinese simplified and traditional, Czech and Russian. But yes, there is no Dutch runtime resource DLL.

including small k instead of big K in Editoroptions is documented on removing the need to press CTRL, the tooltip then changes to "Click to follow link", but I then get no tooltip in IDE windows and Memoe editing windows. I haven't looked into all the options, in the Tools-Options dialogue you can do several settings in the IDE tab and those settings are per Type of file/window, so this kind of seems like settings working in general but that is separately maintained for eg Program Files, Code windows (methods pf forms/classes) browse windows, Memo edit windows etc.

I don't really think you find the setting to change there about background color, but you might find a way to disable the tooltip of links.

Another obvious solution, which takes a lot of effort to implement, though, would be using a web browser control with an HTML textarea as editbox replacement.

It's simpler to use an RTF textbox.

Bye, Olaf.

Olaf Doschke Software Engineering
https://www.doschke.name

RE: Hyperlink Tooltip

Another option to consider is to do without the tooltip completely. Turn it off from the form's ShowTips property. If you feel the user needs to be told how to follow the link, add a label alongside the editbox, and set its caption to the required text.

Going further, you could start by making the label invisible. In the edit box's InteractiveChange, test for the presence of the hyperlink (for example, by searching for a string that starts with "http://" or "https://"). If it is present, make the label visible.

That way, you can forget about having to hack the DLL. The disadvantage is that the ShowTips property will affect the entire form, not just the hyperlink.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads

RE: Hyperlink Tooltip

Hi Koen,

Just mailed the DLL to you, using Wetransfer. My antivirus will nog allow sending a DLL to your.

Regards, Gerrit

RE: Hyperlink Tooltip

(OP)
Hi,
Just now received Gerrit's VFP9RENU.DLL in which he changed the text into Dutch. Will let you know asap.
Meanwhile, if this does not work, I will apply myTooltip.VCX, construct the tip, for consistency with the other forms in this .pjx to the native tooltip looks, apply it on all the objects in this form and on the editbox with EnabledHyperlink.
A little bit more work than to make use of Gerrit's VFP9RENU.DLL.
And if nobody knows why my Editbox has a black backcolor, unchangeble, I will leave it as is. Too bad.
Thanks for all the advises.
Koen

RE: Hyperlink Tooltip

(OP)
Hi Gerrit,
Have implented your VFP9RENU.DLL, sorry but it does not change the tooltip form English to Dutch on my system.
Regards,
Koen

RE: Hyperlink Tooltip

Run your code compiled as EXE, in the IDE the VFP9RENU.DLL isn't used.

Bye, Olaf.

Olaf Doschke Software Engineering
https://www.doschke.name

RE: Hyperlink Tooltip

(OP)
Hi,
Olaf, correct in Exe it shows the tooltip in Dutch.
Gerrit, very nice! Thanks a lot. Did you change more settings into Dutch in this .DLL?
Groet,
Koen

RE: Hyperlink Tooltip

Hi Koen,

I will verify again tomorrow I sent you the right DLL.

Regards, Gerrit

RE: Hyperlink Tooltip

Hi Koen,

Can you verify the file date of the modified vfp9renu.dll is 04-01-2018?
Further please check if you have more than one vfp9renu.dll on your system and that your application is able to use this dll. Make sure your pc uses the modified dll, rename the original or save it in a zip or rar file.

Regards, Gerrit

RE: Hyperlink Tooltip

(OP)
Gerrit,

I suppose you have missed my message, but your VFP9RENU.DLL works great, it gives the tooltip nicely in Dutch. One has to compile the .pjx into an .exe to see the results.
Are there more translations hidden in your .DLL?

Regards,
Joen

RE: Hyperlink Tooltip

Hi Koen,

Sorry for my misunderstanding, I read something else at first.
Glad you have the translation working. I have not made any other translations, but if you’re missing something I would like to know. Maybe I can help, as the translation itself was done, using VFP code bow.

Regards, Gerrit

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close