Editor for WinForms | ComponentOne
C1.Win.C1Editor.4.8 Assembly / C1.Win.C1Editor.ToolStrips Namespace / C1EditorToolStripBase Class / OnInitialize Method
Example

In This Topic
    OnInitialize Method (C1EditorToolStripBase)
    In This Topic
    Adds default items to the toolstrip.
    Syntax
    'Declaration
     
    Protected Overridable Sub OnInitialize() 
    protected virtual void OnInitialize()
    Remarks
    The OnInitialize method allows derived classes to define their own set of default items.
    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