Class

# DesktopToolbarItem

<div class="rst-class">

forsearch

</div>

Toolbar

<div class="rst-class">

forsearch

</div>

ToolbarItem

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

## Description

An item in a `DesktopToolbar</api/user_interface/desktop/desktoptoolbar>`. An item is a style of `DesktopToolbarButton</api/user_interface/desktop/desktoptoolbarbutton>`. Create each item with the `DesktopToolbarButton</api/user_interface/desktop/desktoptoolbarbutton>` class and add each item to a `DesktopToolbar</api/user_interface/desktop/desktoptoolbar>` via the `AddButton<desktoptoolbar.addbutton>` or `AddButtonAt<desktoptoolbar.addbuttonat>` methods.

## Properties

<div class="rst-class">

table-centered_columns_3_and_4

</div>

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

## Property descriptions

<div id="desktoptoolbaritem.caption">

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

</div>

<div class="rst-class">

forsearch

</div>

DesktopToolbarItem.Caption

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

> The caption of the ToolbarItem.
>
> 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 ToolBarItem to "Bold".
>
> ``` xojo
> Me.Caption = "Bold"
> ```

<div id="desktoptoolbaritem.enabled">

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

</div>

<div class="rst-class">

forsearch

</div>

DesktopToolbarItem.Enabled

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

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

<div id="desktoptoolbaritem.name">

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

</div>

<div class="rst-class">

forsearch

</div>

DesktopToolbarItem.Name

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

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

<div id="desktoptoolbaritem.tag">

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

</div>

<div class="rst-class">

forsearch

</div>

DesktopToolbarItem.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 Opening event of the main window.
>
> ``` xojo
> Me.SaveButton.Tag = folderItemToSave
> ```

<div id="desktoptoolbaritem.tooltip">

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

</div>

<div class="rst-class">

forsearch

</div>

DesktopToolbarItem.Tooltip

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

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

## Compatibility

|                       |         |
|-----------------------|---------|
| **Project Types**     | Desktop |
| **Operating Systems** | All     |

<div class="seealso">

`Object</api/data_types/additional_types/object>` parent class; `DesktopToolbar</api/user_interface/desktop/desktoptoolbar>`, `DesktopToolbarButton</api/user_interface/desktop/desktoptoolbarbutton>` classes.

</div>
