ToolTip on MacOS 64 bit

Hello it looks like the tooltip feature does not work on MacOS 64 bit applications. Is there a workaround for this? Is there an alternate or custom control we can use to show tooltips on MacOS? Thanks!

If you use MBS Plugins, you could try the new NSViewTooltipMBS class.
It allows for dynamic text and should work fine in 64-bit.

ToolTips work, you just have to make some adjustments.

Coordinates are relative to the Screen, not Window, where the upper, left corner is 0, 0 IIRC. Text has to be wrapped manually if required. You can use my M_String module for that.

[quote=370623:@Kem Tekinay]ToolTips work, you just have to make some adjustments.

Coordinates are relative to the Screen, not Window, where the upper, left corner is 0, 0 IIRC. Text has to be wrapped manually if required. You can use my M_String module for that.[/quote]

Xojo developer documentation shows: NOTE: ToolTips do not appear on 64-bit macOS builds.

When we tested, ToolTips worked on Windows but not on Mac.

We’ll look at MBS Plugins thanks.

There was a recent update that allegedly fixed this.
Cannot prove this, I don’t know where I saw the release note, and I’m not about to dig through feedback.

I’m not guessing, we are using ToolTips in our cross-platform, 64-bit GUI app.

tooltips in 32 bits seems also to have changed the base coordinate system like you describe Kem.

We tried a simple Tooltip in our app with the code below and it does not appear on MacOS 64 High Sierra:

Dim Xx As Integer = MainWindow.Left + x
Dim Yy As Integer = MainWindow.Top + y
ToolTip.Show(“This is my tip”, xX, yY)
Return True

Are we doing something wrong?

The language reference for Tooltip of XOJO 2017r3 contains the hint “NOTE: ToolTips do not appear on 64-bit macOS builds.”

Yes that’s what our original question was in respect to. However, subsequent answers from Kem and Tim gave us the impression that has changed and that there is a way to allow tooltips to work across both Mac and Windows.

@Kem Tekinay can you elaborate on how we can have tool tips work on MacOS 64? We used coordinates relative to screen as you indicated in your message above but we still don’t see it show up.

Try negative coordinates.

@Kem Tekinay do you mean like the code below? We tried but still no luck.

Dim Xx As Integer = MainWindow.Left + x
Dim Yy As Integer = MainWindow.Top + y
ToolTip.Show(“This is my tip”, 0 - xX, 0 - yY)
Return True

I don’t have the code in front of me, but we did get it working. It may just be either Xx or Yy that has to be negative, not both.

omg Kem you’re right.
you must negate Y, and let X the same positive value
and the coordinates are from the top left screen, not the window as it was before …

I still think it’s a bug ( and not a feature …)

http://documentation.xojo.com/index.php/ToolTip.Show says that it’s relative to the screen, not the window. This was changed in the documentation on 9 June 2017 (so I don’t think they consider it a bug)

just forgot to say : it’s not only a 64 bits problem, my app is still 32 bits …

negating Y is a bug

if you want to get techincal… All Xojos other graphics methods that place Y=0 at the top of the screen are the “bugs” :slight_smile:
Since the underlying graphics methods in macOS have Y=0 at the bottom

[quote=371363:@Dave S]if you want to get techincal… All Xojos other graphics methods that place Y=0 at the top of the screen are the “bugs” :slight_smile:
Since the underlying graphics methods in macOS have Y=0 at the bottom[/quote]
Not entirely fair as when Xojo first started we were still using System 7 and its coordinates were top down (IIRC). In fact IIRC most computer systems are top-down, I remember at school in one I.T. lesson (~20 years ago) talking about the different coordinate systems and how top down was more natural.