IToolbarButton.AdditionalShortCuts

Syntax

AdditionalShortCuts: IShortCutCollection;

Description

The AdditionalShortCuts property returns the collection of additional combinations of hot keys that are associated with this button of the toolbar.

Comments

If the button uses the Action object, the value of the AdditionalShortCuts property of the button is determined automatically by the value of the AdditionalShortCuts property of the Action object.

In object inspector the special editor is implemented for this property. After the cursor has been set in the editor, all key pressings and key combinations should be captured automatically. Pressed keys and key combinations should be set as the additional hot keys for this button. The following keys are ignored in this editor:

The combinations of hot keys are separated by the ";" character in the list.

Example

Executing the example requires a form, the Button1 button on this form and the Toolbar component that implements the toolbar of the form. Several buttons were created on the toolbar.

Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);

Var

SCCollect: IShortCutCollection;

Begin

ToolbarButton1.ShortCut := MakeShortcut(KeyModifiers.Ctrl, Keys.C);

SCCollect := ToolbarButton1.AdditionalShortCuts;

SCCollect.Add(MakeShortcut(KeyModifiers.Ctrl, Keys.Insert));

End Sub Button1OnClick;

After executing the example clicking the button assigns two combinations of hot keys for the button on the ToolbarButton1 toolbar. The first combination is set in the ShortCut main property, the second one is added to the collection of additional combinations of hot keys.

See also:

IToolbarButton