Class
ToolbarItem (deprecated)
Warning
This item was deprecated in version 2021r3. Please use DesktopToolbarItem as a replacement.
Description
An item in a Toolbar. An item is a style of ToolbarButton. Create each item with the ToolbarButton class and add each item to a Toolbar via the AddButton or AddButtonAt methods.
Properties
Name |
Type |
Read-Only |
Shared |
---|---|---|---|
Property descriptions
ToolbarItem.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"
ToolbarItem.Enabled
Enabled As Boolean
True if the ToolbarItem is enabled.
ToolbarItem.Name
Name As String
The name of the ToolbarItem.
ToolbarItem.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
ToolbarItem.Tooltip
Tooltip As String
The tooltip that is displayed when the pointer is over the ToolbarItem.
Compatibility
All project types on all supported operating systems.
See also
Object parent class; Toolbar, ToolbarButton classes.