CommandBarButton

Properties:

Action
ButtonOrder
Buttons
ButtonType
Check
DefaultButton
Description
Enabled
ModifiesData
Name
Picture
Representation
Shortcut
Text
ToolTip

Description:

You can use it to access command bar button properties.

Availability:

Thick client.

Example:

CP = Controls.CommandBar;
NewAction = New Action("AdditionalAction");
ButtonType = CommandBarButtonType.Action; 
NewButton = CP.Buttons.Add(ButtonType,,,NewAction);
NewButton.Name = "NewButton";
NewButton.Representation = CommandBarButtonRepresentation.Picture;
NewButton.Picture = PictureLib.Magnifier;
NewButton.ToolTip = "call ""Additional action""";
NewButton.Description = "Button created using Script";
//Alt+Ctrl+F3 key combination
Shortcut = New Shortcut(Key.F3, True, True);
NewButton.Shortcut = Shortcut;

See also:

CommandBarButtons, property <Button name>
CommandBarButtons, method Insert
CommandBarButtons, method Add
CommandBarButtons, method Find
CommandBarButtons, method IndexOf
CommandBarButtons, method Get

    

1C:Enterprise Developer's Community