Add(Value: IComponent);
Value - 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, a button named Button1 on it 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 Toolbar1 toolbar.
See also: