Add(Value: IComponent);
Value. The component that must be added to the toolbar.
The Add method adds a component to the toolbar.
The ToolbarButton or ToolbarComboBox components can be placed on the toolbar.
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
BarButton: IToolbarButton;
Begin
BarButton := New ToolbarButton.Create;
BarButton.Text := "New button";
Toolbar1.Controls.Add(BarButton);
End Sub Button1OnClick;
After executing the example, clicking the button creates a new button on the toolbar.
See also: