DesktopApplication.ShowTooltip

From Xojo Documentation

Revision as of 18:12, 23 July 2021 by Gperlman (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
You are currently browsing the old Xojo documentation site. Please visit the new Xojo documentation site!
Shared Method

DesktopApplication.ShowTooltip(tip As String, x As Integer, y As Integer, autoHide As Boolean)

New in 2021r3

Supported for all project types and targets.

Pops up the passed tip at the global coordinates given by x, y (relative to the screen). If AutoHide is True, then the tip will automatically hide itself; you do not have to call HideTooltip to hide it. The default is True.

Notes

AutoHide is used only on Windows and Linux; on macOS, the ToolTip hides automatically.

Examples

The following code is placed in the MouseDown event of a window. It uses the X and Y coordinates passed into the event.

App.ShowTooltip("This is my tip", Self.Left + X, Self.Top + Y)
Return True

The following code in the Pressed event of a DesktopButton displays the contents of a DesktopTextField as a tip.

App.ShowTooltip(TextField1.Value, System.MouseX, System.MouseY + 20)