[]
        
(Showing Draft Content)

C1.Win.C1Editor.ToolStrips.C1EditorToolStripBase

C1EditorToolStripBase Class

Implements the basic functionality common to C1Editor-related toolstrips. This class is abstract.

Namespace: C1.Win.C1Editor.ToolStrips
Assembly: C1.Win.C1Editor.4.8.dll
Syntax
public abstract class C1EditorToolStripBase : ToolStrip, IDropTarget, ISynchronizeInvoke, IWin32Window, IBindableComponent, IComponent, IDisposable
Remarks

To create your own C1Editor-related toolstrip, inherit from the C1EditorToolStripBase class.

Override OnInitialize() to add items to the toolstrip.

Use AddButton(CommandButton) to add a button of C1EditorToolStripButton type.

Use AddComboBox(CommandComboBox) to add a combo box of C1EditorToolStripComboBox type.

Examples

The following code example demonstrates how to create and use 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);
   }
}

private void Form1_Load(object sender, EventArgs e)
{
     MyToolStrip myToolStrip = new MyToolStrip();
     myToolStrip.Editor = c1Editor1;
     this.Controls.Add(myToolStrip);
}

Constructors

Name Description
C1EditorToolStripBase()

Creates an instance of C1EditorToolStripBase class.

Properties

Name Description
Editor

Gets or sets the C1Editor control.

Items

Overrides ToolStrip.Items.

Methods

Name Description
AddButton(CommandButton)

Adds a button to the toolstrip.

AddColorPicker(CommandColorPicker)

Adds a color picker to the toolstrip.

AddComboBox(CommandComboBox)

Adds a combo box to the toolstrip.

AddSplitButton(CommandSplitButton)

Adds a split button to the toolstrip.

OnInitialize()

Adds default items to the toolstrip.