CommandBarButtons

Collection elements:

CommandBarButton
Iteration through collection using For each ... In ... Do operator is available to object. Collection items are retrieved during iteration.
Access to collection item is possible using [...] operator. Item index (starting from 0) is passed as an argument.

Properties:

<Button name>

Methods:

Add
Clear
Count
Delete
Find
Get
IndexOf
Insert
Move

Description:

You can use it to access command bar button collection properties and methods.

Availability:

Thick client.

Example:

CP = Controls.CommandBar1;
PressingButton = New Action("NewPressing");
ButtonType = CommandBarButtonType.Action; 
NewButton = CP.Buttons.Add("ActionButton",ButtonType,,,PressingButton);
NewButton.Picture = PictureLib.Parameters; 
NewButton.Representation = CommandBarButtonRepresentation.Auto;

See also:

CommandBar, property Buttons
CommandBarButton, property Buttons
Button, property Buttons

    

1C:Enterprise Developer's Community