IToolbarControls.Insert

Syntax

Insert(Index: Integer; Value: IComponent);

Parameters

Index. Index of the position, to which the component must be inserted.

Value. The component that must be inserted to the toolbar.

Description

The Insert method inserts a component to the specified position on the toolbar.

Example

Executing the example requires a form, the Button1 button on the form, and the Toolbar component named Toolbar1.

Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
    Controls: IToolbarControls;
Begin
    Controls := Toolbar1.Controls;
    Controls.Insert(Controls.Count, Controls.Item(0));
End Sub Button1OnClick;

After executing the example clicking the button moves the control located on the first position of toolbar to the last position.

See also:

IToolbarControls