<div class="meta" robots="noindex">

</div>

Class

# ToolTip

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

<div class="warning">

<div class="title">

Warning

</div>

This item was deprecated in version 2019r2. Please use `DesktopApplication.ShowTooltip<application.showtooltip>` and `DesktopApplication.HideTooltip<application.hidetooltip>` as a replacement.

</div>

## Description

Used to create and display a <span class="title-ref">ToolTip</span> at the user-specified location.

## Methods

<div class="rst-class">

table-centered_column_4

</div>

| Name                 | Parameters                                                                                                                                                                | Returns | Shared |
|----------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------|--------|
| `Hide<tooltip.hide>` |                                                                                                                                                                           |         | ✓      |
| `Show<tooltip.show>` | tip As `String</api/data_types/string>`, x As `Integer</api/data_types/integer>`, y As `Integer</api/data_types/integer>`, autoHide As `Boolean</api/data_types/boolean>` |         | ✓      |

## Method descriptions

<div id="tooltip.hide">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

ToolTip.Hide

**Hide**

Hides the <span class="title-ref">ToolTip</span>. Call this if the *AutoHide* parameter of the `Application.ShowTooltip<application.showtooltip>` method was `False</api/language/false>`.

This method is `shared</api/language/shared>`.

Call this if you had passed `False</api/language/false>` to the corresponding call to `Application.ShowTooltip<application.showtooltip>` or you are not programming for macOS and need to hide the <span class="title-ref">ToolTip</span> manually.

``` xojo
Tooltip.Hide
```

<div id="tooltip.show">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

ToolTip.Show

**Show**(tip As `String</api/data_types/string>`, x As `Integer</api/data_types/integer>`, y As `Integer</api/data_types/integer>`, autoHide As `Boolean</api/data_types/boolean>`)

Pops up the passed tip at the global coordinates given by *x*, *y* (relative to the screen). If *AutoHide* is `True</api/language/true>`, then the tip will automatically hide itself; you do not have to call `Application.HideTooltip<application.hidetooltip>` to hide it. The default is `True</api/language/true>`.

This method is `shared</api/language/shared>`.

*AutoHide* is used only on Windows and Linux; on macOS, the <span class="title-ref">ToolTip</span> hides automatically.

The following code is placed in the `MouseDown<window.mousedown>` event of a `window</api/deprecated/window>`. It uses the *X* and *Y* coordinates passed into the event.

``` xojo
ToolTip.Show("This is my tip", Self.Left + X, Self.Top + Y)
Return True
```

The following line in the `Action<pushbutton.action>` event of a `PushButton</api/deprecated/pushbutton>` displays the contents of a `TextField</api/deprecated/textfield>` as a tip.

``` xojo
ToolTip.Show(TextField1.Text, System.MouseX, System.MouseY + 20)
```

## Notes

<div class="warning">

<div class="title">

Warning

</div>

This class is deprecated as mentioned above. If you still need to use this class in your 2019r2 or later projects, you must use the "Global." prefix (Example: Global.Tooltip.Hide) otherwise you will get a compilation error. However, it's recommended that you migrate to the replacement methods.

</div>

Since the <span class="title-ref">ToolTip</span> class's methods are shared methods, you do not need to instantiate an instance of the class in order to use it.

## Sample code

The following code is placed in the `MouseDown<window.mousedown>` event of a `Window</api/deprecated/window>`. It uses the X and Y coordinates passed into the event.

``` xojo
ToolTip.Show("This is my tip", Self.Left + X, Self.Top + Y)
Return True
```

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

The following line in the `Action<pushbutton.action>` event of a `PushButton</api/deprecated/pushbutton>` displays the contents of a `TextField</api/deprecated/textfield>` as a tip.

``` xojo
Tooltip.Show(TextField1.Text, System.MouseX, System.MouseY + 20, True)
```

## Compatibility

All project types on all supported operating systems.

## See also

`Object</api/data_types/additional_types/object>` parent class; `RectControl.Tooltip<rectcontrol.tooltip>` property
