Skip to main content

CommandBarButtons.Insert

Insert

Syntax

Insert(<Index>, <Name>, <Type>, <Text>, <Action>)

Parameters

<Index> (required)

Type: Number. Position in a collection of buttons where the button will be inserted.

<Name> (optional)

Type: String. Button name should follow name rules. It is unique within a command bar.

<Type> (optional)

Type: CommandBarButtonType. Command bar button type(separator, action, popup).

<Text> (optional)

Type: String. Button text.

<Action> (optional)

Type: Action. Action that should be performed when user clicks this button. For Separator and Popup button types you do not have to specify an action.

Returned value

Type: CommandBarButton.

Description

Inserts a button to specified position of the collection of command bar buttons.

Availability

Thick client.

Example

CP = Controls.CommandBar;
NewAction = New Action("MyProcedureInFormModule");
ButtonType = CommandBarButtonType.Action;
NewButton = CP.Buttons.Insert(0, "Action1", ButtonType,, NewAction);

Translation

Русская версия: КнопкиКоманднойПанели.Вставить (CommandBarButtons.Insert)