Insert(Index: Integer; Value: IComponent);
Index - index of the position, to which the element must be inserted.
Value - component that must be inserted on the toolbar.
The Insert method inserts the Value component to the Index position on the toolbar.
Executing the example requires a form, a button named Button1 on it 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: