Autodesk.AutoCAD.Customization Namespace > ToolbarButton Class > ToolbarButton Constructor > ToolbarButton(string, string, Toolbar, int) Constructor
ToolbarButton.ToolbarButton(string, string, Toolbar, int) Constructor
Description

 

This constructor sets a parent and index position. It also adds a menu macro.

Visual Basic
Public Sub New(
    macroId As string, 
    name As string, 
    parent As Toolbar, 
    index As Integer
)
C#
public ToolbarButton(
    string macroId, 
    string name, 
    Toolbar parent, 
    int index
);
Parameters
Parameters 
Description 
string macroId 
Input the UID of the MenuMacro to associate with the button. 
string name 
Input the name to use as the toolbar button's tool tip, if different from the name of the MenuMacro
Toolbar parent 
Input the parent. 
int index 
Input the index at which to insert new PopMenuItem in parent's collection. 
Links
   Comments?