Class

DesktopToolbarItem


Description

An item in a DesktopToolbar. An item is a style of DesktopToolbarButton. Create each item with the DesktopToolbarButton class and add each item to a DesktopToolbar via the AddButton or AddButtonAt methods.

Properties

Name

Type

Read-Only

Shared

Caption

String

Enabled

Boolean

Name

String

Tag

Variant

Tooltip

String

Property descriptions


DesktopToolbarItem.Caption

Caption As 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".

Me.Caption = "Bold"

DesktopToolbarItem.Enabled

Enabled As Boolean

True if the DesktopToolbarItem is enabled.


DesktopToolbarItem.Name

Name As String

The name of the DesktopToolbarItem.


DesktopToolbarItem.Tag

Tag As 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.

Me.SaveButton.Tag = folderItemToSave

DesktopToolbarItem.Tooltip

Tooltip As String

The tooltip that is displayed when the pointer is over the DesktopToolbarItem.

Compatibility

Desktop projects on all supported operating systems.

See also

Object parent class; DesktopToolbar, DesktopToolbarButton classes.