Explore the Properties of Toolbar Items

AutoCAD ActiveX

 
Explore the Properties of Toolbar Items
 
 
 

All toolbar items share the following properties:

Tagstring

A tag, or name tag, is a string consisting of alphanumeric and underscore (_) characters. This string uniquely identifies the toolbar item within a given toolbar. A new tag is assigned automatically when a toolbar item is created.

You can read or write the value of a tag by using the Tagstring property.

Name

A name is a string identifying the toolbar item. It is also the string used for the tooltip text, which is the text string that pops up in AutoCAD when a user holds the mouse or another pointing device over the toolbar item.

You can read or write the value of a name by using the Name property.

Macro

A macro is a series of commands that executes specific actions when a toolbar item is selected. Macros can simply be recordings of keystrokes that accomplish a task, or they can be a complex combination of commands, AutoLISP, DIESEL, or ActiveX programming code.

You can read or write the value of a macro by using the Macro property.

HelpString

A help string is the text string that appears in the AutoCAD status line for a toolbar button.

You can read or write the value of a help string by using the HelpString property.

Index

The index of a toolbar item specifies the position of that toolbar item on the toolbar to which it belongs. The index position of a toolbar always begins with position 0. For example, if the item is the first item on a toolbar, it will have an index position of 0. If it is the second item on a toolbar, it will have an index position of 1, and so on.

You can read the index position of a toolbar item by using the Index property.

Type

A toolbar item can be one of the following types: a regular toolbar button, a separator, a flyout toolbar button, or a special control element. If the item is a regular toolbar button, this property returns acButton. If the item is a separator, this property returns acToolButtonSeparator. If the item is a flyout button, this property returns acFlyout. If the item is a special control element, this property returns acControl.

You can determine the type of a toolbar item by using the Type property.

Flyout

If the toolbar item is of the type acFlyout, this property returns the toolbar that is attached as the flyout toolbar. The flyout toolbar is returned as a Toolbar object.

If the menu item is not of the type acFlyout, this property returns NULL.

You can find the flyout toolbar of a toolbar item by using the Flyout property.

Parent

This property returns the toolbar on which the toolbar item resides. The Parent toolbar is returned as a Toolbar object.

You can find the toolbar to which a toolbar item belongs by using the Parent property.

Toolbar Properties

There are other properties that apply to all toolbar items on the toolbar. Such properties include whether the toolbar is docked or floating, visible or hidden, and whether the toolbar uses large buttons or small buttons.