HelpTag/Tooltip - Can you force EOL?

Just wondering if there was a way to force an eol with the HelpTag.

Not a big deal, but just curious.


in the OPEN event for the control you wish to add the helptag to

Ah! Thanks Dave. I didn’t even realise that it “could” be done in code. :S

I used the code in the MouseEnter event and it all works as expected.

Same apply to TextFields ! TextField is single line only, but passing strings with EndOfLine to a TextField results in a multiline TextField.

[quote=335308:@Steve Kelepouris]Ah! Thanks Dave. I didn’t even realise that it “could” be done in code. :S

I used the code in the MouseEnter event and it all works as expected.[/quote]

As this is in the Windows forum, it will work as Dave describes. Just be aware that this same technique does NOT work in OSX, so if you have any plans for cross-platform support just bear that in mind. AFAIK, you can’t force line breaks in OSX help tags.

Somebody please prove me wrong. :slight_smile:

Douglas, before affirming things, you should try them.

What Dave describes works perfectly well in 2017R1.1 under Sierra 10.12.5, both for HelpTag, and ToolTip.

No need to prove anything, since you are in error from the start.

[quote=335344:@Michel Bujardet]me.HelpTag=“A”+EndOfLine+“B”+EndOfLine+“C”

Hmm, does anyone else remember this NOT working on OSX? I had tried to do this exact thing a couple of years ago, and it worked fine in my Windows build and not in my OSX builds. And at the time did some online searches that suggested OSX did not support it in their native tooltip. But I’m not finding those same discussions now in a quick search.

Well it does work in OSX… as that is where I tried it before I posted :slight_smile:

and while I do not recall it “not working”, I do recall writing my own helptag class at one point… but I don’t recall why. unless it was to control color and font as well

Uh, what’s all this Open event business?
Does it not work for you guys using the multi-line editor in the IDE?

I use the various control events… as the content of the help tag may change based on the context of the app at any given time

I also was using an event as the data needed to be dynamic. But looking up that project now, it actually uses the Tooltip class and Tooltip.Show() instead of the helptag property. Still running a test with that now I am able to get line breaks even under OSX, so not sure why I had trouble before. It would have been an older Xojo release and older OSX release.

However, this made me lookup the Tooltip class in the language reference to see if it said anything, and I notice a disclaimer:

NOTE: ToolTips do not appear on 64-bit macOS builds.

See Tooltip

So will I no longer be able to use the Tooltip class once I switch to 64-bit builds for OSX? But helptags still work?

There was a discussion about precisely that not long ago. Tooltip can be replaced fairly easily with a small canvas.

Thanks Michel; I must have not seen that discussion. I’ll search for it.

Actually, one of the easiest ways is to use a ContainerControl as custom class. That way to show a tooltip, all you have to do is embedwithin that CC with the message inside. That is how I proceed.