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

</div>

Class

# ToolbarItem (deprecated)

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

<div class="warning">

<div class="title">

Warning

</div>

This item was deprecated in version 2021r3. Please use `DesktopToolbarItem</api/user_interface/desktop/desktoptoolbaritem>` as a replacement.

</div>

## Description

An item in a `Toolbar</api/deprecated/toolbar>`. An item is a style of `ToolbarButton</api/deprecated/toolbarbutton>`. Create each item with the `ToolbarButton</api/deprecated/toolbarbutton>` class and add each item to a `Toolbar</api/deprecated/toolbar>` via the `AddButton<toolbar.addbutton>` or `AddButtonAt<toolbar.addbuttonat>` methods.

## Properties

<div class="rst-class">

table-centered_columns_3_and_4

</div>

| Name                           | Type                               | Read-Only | Shared |
|--------------------------------|------------------------------------|-----------|--------|
| `Caption<toolbaritem.caption>` | `String</api/data_types/string>`   |           |        |
| `Enabled<toolbaritem.enabled>` | `Boolean</api/data_types/boolean>` |           |        |
| `Name<toolbaritem.name>`       | `String</api/data_types/string>`   |           |        |
| `Tag<toolbaritem.tag>`         | `Variant</api/data_types/variant>` |           |        |
| `Tooltip<toolbaritem.tooltip>` | `String</api/data_types/string>`   |           |        |

## Property descriptions

<div id="toolbaritem.caption">

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

</div>

<div class="rst-class">

forsearch

</div>

ToolbarItem.Caption

**Caption** As `String</api/data_types/string>`

The caption of the <span class="title-ref">ToolbarItem</span>.

This property can be set inside the IDE or programmatically.

To set an accelerator character, precede the character in the Caption with an ampersand. In order to show an ampersand in the Caption, use two ampersands in a row.

This code sets the caption of the <span class="title-ref">ToolbarItem</span> to "Bold".

``` xojo
Me.Caption = "Bold"
```

<div id="toolbaritem.enabled">

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

</div>

<div class="rst-class">

forsearch

</div>

ToolbarItem.Enabled

**Enabled** As `Boolean</api/data_types/boolean>`

`True</api/language/true>` if the <span class="title-ref">ToolbarItem</span> is enabled.

<div id="toolbaritem.name">

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

</div>

<div class="rst-class">

forsearch

</div>

ToolbarItem.Name

**Name** As `String</api/data_types/string>`

The name of the <span class="title-ref">ToolbarItem</span>.

<div id="toolbaritem.tag">

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

</div>

<div class="rst-class">

forsearch

</div>

ToolbarItem.Tag

**Tag** As `Variant</api/data_types/variant>`

A “hidden” value associated with the toolbar item.

The tag is accessible via code when the user chooses the toolbar item but, unlike the Caption property, is not displayed in the toolbar.

This example is in the Toolbar Initialized event of the main window.

``` xojo
Me.SaveButton.Tag = folderItemToSave
```

<div id="toolbaritem.tooltip">

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

</div>

<div class="rst-class">

forsearch

</div>

ToolbarItem.Tooltip

**Tooltip** As `String</api/data_types/string>`

The tooltip that is displayed when the pointer is over the <span class="title-ref">ToolbarItem</span>.

## Compatibility

All project types on all supported operating systems.

## See also

`Object</api/data_types/additional_types/object>` parent class; `Toolbar</api/deprecated/toolbar>`, `ToolbarButton</api/deprecated/toolbarbutton>` classes.
