AddToolbarButton Method |
Adds a toolbar item to a toolbar at a specified position.
Signature
RetVal = object.AddToolbarButton(Index, Name, HelpString, Macro[, FlyoutButton])
Object
Toolbar
The object or objects this method applies to.
Index
Variant; input-only
The index location in the toolbar where the item is to be
added.
The index must be either an integer or a string. If an integer is
specified, the index must be between 0 and N-1, where
N is the number of objects in the toolbar. The new item will
be added immediately before the specified index location.
Name
String; input-only
The string that identifies the toolbar button. The string must
comprise alphanumeric characters with no punctuation other than a
dash (-) or an underscore (_). This string is displayed as the
tooltip when the cursor is placed over the toolbar button.
HelpString
String; input-only
The string that is displayed in the AutoCAD status line for the
button.
Macro
String; input-only
The name of the macro associated with this item.
FlyoutButton
Variant; input-only; optional
A Boolean variable stating if the new button is to be a flyout
button or not. If the button is a flyout button, this parameter
must be set to TRUE. If the button is not a flyout button, this
parameter can be set to FALSE or ignored and the new ToolbarItem
object will be returned.
TRUE: The button is a flyout button.
FALSE: The button is not a flyout button.
RetVal
ToolbarItem object
The newly created toolbar item.
Remarks
You can only add or remove toolbar buttons when the toolbar is visible.
Comments? |