# C1.Win.C1Editor.ToolStrips.C1EditorToolStripBase.AddButton

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_Win_C1Editor_ToolStrips_C1EditorToolStripBase_AddButton_" data-uid="C1.Win.C1Editor.ToolStrips.C1EditorToolStripBase.AddButton*">AddButton Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_Win_C1Editor_ToolStrips_C1EditorToolStripBase_AddButton_" data-uid="C1.Win.C1Editor.ToolStrips.C1EditorToolStripBase.AddButton*"></a>
<h4 id="C1_Win_C1Editor_ToolStrips_C1EditorToolStripBase_AddButton_C1_Win_C1Editor_ToolStrips_CommandButton_" data-uid="C1.Win.C1Editor.ToolStrips.C1EditorToolStripBase.AddButton(C1.Win.C1Editor.ToolStrips.CommandButton)">AddButton(CommandButton)</h4>
<div class="markdown level1 summary"><p>Adds a button to the toolstrip.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">protected C1EditorToolStripButton AddButton(CommandButton command)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Protected Function AddButton(command As CommandButton) As C1EditorToolStripButton</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="C1.Win.C1Editor.ToolStrips.CommandButton.html">CommandButton</a></td>
      <td><span class="parametername">command</span></td>
      <td><p>The command assigned to the button.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="C1.Win.C1Editor.ToolStrips.C1EditorToolStripButton.html">C1EditorToolStripButton</a></td>
      <td><p>The new button.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 id="C1_Win_C1Editor_ToolStrips_C1EditorToolStripBase_AddButton_C1_Win_C1Editor_ToolStrips_CommandButton__remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>The AddButton method allows inheritors to add a button of the <see sref="C1EditorToolStripButton"></see> class to the toolstrip.</p>
</div>
<h5 id="C1_Win_C1Editor_ToolStrips_C1EditorToolStripBase_AddButton_C1_Win_C1Editor_ToolStrips_CommandButton__examples">Examples</h5>
<p>The following code example demonstrates how to create a custom toolstrip that has Style combo box and Undo, Redo buttons.</p>
<pre><code class="lang-csharp">public class MyToolStrip : C1EditorToolStripBase
{
   protected override void OnInitialize()
   {
    AddComboBox(CommandComboBox.Style);
    AddButton(CommandButton.Undo);
    AddButton(CommandButton.Redo);
   }
}</code></pre>

</div>
