Editor for WinForms | ComponentOne
C1.Win.C1Editor.4.5.2 Assembly / C1.Win.C1Editor.ToolStrips Namespace / C1EditorToolStripBase Class / AddButton Method
The command assigned to the button.
Example

In This Topic
    AddButton Method
    In This Topic
    Adds a button to the toolstrip.
    Syntax
    'Declaration
     
    Protected Function AddButton( _
       ByVal command As CommandButton _
    ) As C1EditorToolStripButton
    protected C1EditorToolStripButton AddButton( 
       CommandButton command
    )

    Parameters

    command
    The command assigned to the button.

    Return Value

    The new button.
    Remarks
    The AddButton method allows inheritors to add a button of the %% class to the toolstrip.
    Example
    The following code example demonstrates how to create a custom toolstrip that has Style combo box and Undo, Redo buttons.
    public class MyToolStrip : C1EditorToolStripBase
    {
       protected override void OnInitialize()
       {
        AddComboBox(CommandComboBox.Style);
        AddButton(CommandButton.Undo);
        AddButton(CommandButton.Redo);
       }
    }
    See Also