# C1.Win.Ribbon.RibbonTextBox

## Content

<div class="doc-site-dotnet-api-container">



  <h1 id="C1_Win_Ribbon_RibbonTextBox" data-uid="C1.Win.Ribbon.RibbonTextBox" class="text-break">RibbonTextBox Class
</h1>
  <div class="markdown level0 summary"><p>Represents a text box element in a <a class="xref" href="C1.Win.Ribbon.C1Ribbon.html">C1Ribbon</a> control.</p>
</div>
  <div class="markdown level0 conceptual"></div>
  <div class="inheritance">
    <h5>Inheritance</h5>
    <div class="level0"><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></div>
    <div class="level1"><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.marshalbyrefobject">MarshalByRefObject</a></div>
    <div class="level2"><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.componentmodel.component">Component</a></div>
    <div class="level3"><a class="xref" href="C1.Win.Ribbon.RibbonItem.html">RibbonItem</a></div>
    <div class="level4"><a class="xref" href="C1.Win.Ribbon.RibbonIconItem.html">RibbonIconItem</a></div>
    <div class="level5"><span class="xref">RibbonTextBox</span></div>
      <div class="level6"><a class="xref" href="C1.Win.Ribbon.RibbonEditBox.html">RibbonEditBox</a></div>
  </div>
  <div class="implements">
    <h5>Implements</h5>
    <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.componentmodel.icomponent">IComponent</a></div>
    <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.idisposable">IDisposable</a></div>
    <div><span class="xref">ISupportUiaContainer</span></div>
  </div>
  <h6><strong>Namespace</strong>: <a class="xref" href="C1.Win.Ribbon.html">C1.Win.Ribbon</a></h6>
  <h6><strong>Assembly</strong>: C1.Win.Ribbon.10.dll</h6>
  <h5 id="C1_Win_Ribbon_RibbonTextBox_syntax">Syntax</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public class RibbonTextBox : RibbonIconItem, IComponent, IDisposable, ISupportUiaContainer</code></pre>
  </div>
  <div class="codewrapper">
    <pre><code class="lang-vbnet hljs">Public Class RibbonTextBox
    Inherits RibbonIconItem
    Implements IComponent, IDisposable, ISupportUiaContainer</code></pre>
  </div>
  <h3 id="constructors">Constructors
</h3>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td id="C1_Win_Ribbon_RibbonTextBox__ctor" data-uid="C1.Win.Ribbon.RibbonTextBox.#ctor">
          <a class="xref" href="C1.Win.Ribbon.RibbonTextBox.-ctor.html#C1_Win_Ribbon_RibbonTextBox__ctor">RibbonTextBox()</a>
        </td>
        <td class="markdown level1 summary"><p>Creates a new instance of <a class="xref" href="C1.Win.Ribbon.RibbonTextBox.html">RibbonTextBox</a>.</p>
</td>
      </tr>
    </tbody>
  </table>
  <h3 id="properties">Properties
</h3>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td id="C1_Win_Ribbon_RibbonTextBox_ContextMenuStrip" data-uid="C1.Win.Ribbon.RibbonTextBox.ContextMenuStrip">
          <a class="xref" href="C1.Win.Ribbon.RibbonTextBox.ContextMenuStrip.html#C1_Win_Ribbon_RibbonTextBox_ContextMenuStrip">ContextMenuStrip</a>
        </td>
        <td class="markdown level1 summary"><p>Gets or sets the context menu strip associated with the text box.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Win_Ribbon_RibbonTextBox_CueBanner" data-uid="C1.Win.Ribbon.RibbonTextBox.CueBanner">
          <a class="xref" href="C1.Win.Ribbon.RibbonTextBox.CueBanner.html#C1_Win_Ribbon_RibbonTextBox_CueBanner">CueBanner</a>
        </td>
        <td class="markdown level1 summary"><p>Gets or sets the textual cue, or tip, that is displayed by RibbonTextBox to prompt the user for information.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Win_Ribbon_RibbonTextBox_GapBeforeTextArea" data-uid="C1.Win.Ribbon.RibbonTextBox.GapBeforeTextArea">
          <a class="xref" href="C1.Win.Ribbon.RibbonTextBox.GapBeforeTextArea.html#C1_Win_Ribbon_RibbonTextBox_GapBeforeTextArea">GapBeforeTextArea</a>
        </td>
        <td class="markdown level1 summary"><p>Gets or sets the gap between the label and text area when this <a class="xref" href="C1.Win.Ribbon.RibbonTextBox.html">RibbonTextBox</a> appears on a <a class="xref" href="C1.Win.Ribbon.RibbonGroup.html">RibbonGroup</a>.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Win_Ribbon_RibbonTextBox_KeyTip" data-uid="C1.Win.Ribbon.RibbonTextBox.KeyTip">
          <a class="xref" href="C1.Win.Ribbon.RibbonTextBox.KeyTip.html#C1_Win_Ribbon_RibbonTextBox_KeyTip">KeyTip</a>
        </td>
        <td class="markdown level1 summary"><p>Gets or sets the KeyTip providing keyboard access to a RibbonTextBox.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Win_Ribbon_RibbonTextBox_Label" data-uid="C1.Win.Ribbon.RibbonTextBox.Label">
          <a class="xref" href="C1.Win.Ribbon.RibbonTextBox.Label.html#C1_Win_Ribbon_RibbonTextBox_Label">Label</a>
        </td>
        <td class="markdown level1 summary"><p>Gets or sets the label used to identify this <a class="xref" href="C1.Win.Ribbon.RibbonTextBox.html">RibbonTextBox</a>.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Win_Ribbon_RibbonTextBox_LabelWidth" data-uid="C1.Win.Ribbon.RibbonTextBox.LabelWidth">
          <a class="xref" href="C1.Win.Ribbon.RibbonTextBox.LabelWidth.html#C1_Win_Ribbon_RibbonTextBox_LabelWidth">LabelWidth</a>
        </td>
        <td class="markdown level1 summary"><p>Gets or sets the width of the text label. Set to -1 to let the label calculate width automatically.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Win_Ribbon_RibbonTextBox_MaxLength" data-uid="C1.Win.Ribbon.RibbonTextBox.MaxLength">
          <a class="xref" href="C1.Win.Ribbon.RibbonTextBox.MaxLength.html#C1_Win_Ribbon_RibbonTextBox_MaxLength">MaxLength</a>
        </td>
        <td class="markdown level1 summary"><p>Gets or sets the maximum length of the string in the Text property in this <a class="xref" href="C1.Win.Ribbon.RibbonTextBox.html">RibbonTextBox</a>.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Win_Ribbon_RibbonTextBox_PasswordChar" data-uid="C1.Win.Ribbon.RibbonTextBox.PasswordChar">
          <a class="xref" href="C1.Win.Ribbon.RibbonTextBox.PasswordChar.html#C1_Win_Ribbon_RibbonTextBox_PasswordChar">PasswordChar</a>
        </td>
        <td class="markdown level1 summary"><p>Gets or sets the character used to mask characters of a password in the <a class="xref" href="C1.Win.Ribbon.RibbonTextBox.html">RibbonTextBox</a>.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Win_Ribbon_RibbonTextBox_ReadOnly" data-uid="C1.Win.Ribbon.RibbonTextBox.ReadOnly">
          <a class="xref" href="C1.Win.Ribbon.RibbonTextBox.ReadOnly.html#C1_Win_Ribbon_RibbonTextBox_ReadOnly">ReadOnly</a>
        </td>
        <td class="markdown level1 summary"><p>Gets or sets a value indicating whether the contents of the component can be changed.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Win_Ribbon_RibbonTextBox_Text" data-uid="C1.Win.Ribbon.RibbonTextBox.Text">
          <a class="xref" href="C1.Win.Ribbon.RibbonTextBox.Text.html#C1_Win_Ribbon_RibbonTextBox_Text">Text</a>
        </td>
        <td class="markdown level1 summary"><p>Gets or sets the text in this <a class="xref" href="C1.Win.Ribbon.RibbonTextBox.html">RibbonTextBox</a>.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Win_Ribbon_RibbonTextBox_TextAlign" data-uid="C1.Win.Ribbon.RibbonTextBox.TextAlign">
          <a class="xref" href="C1.Win.Ribbon.RibbonTextBox.TextAlign.html#C1_Win_Ribbon_RibbonTextBox_TextAlign">TextAlign</a>
        </td>
        <td class="markdown level1 summary"><p>Gets or sets how text is aligned in the <a class="xref" href="C1.Win.Ribbon.RibbonTextBox.html">RibbonTextBox</a>.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Win_Ribbon_RibbonTextBox_TextAreaWidth" data-uid="C1.Win.Ribbon.RibbonTextBox.TextAreaWidth">
          <a class="xref" href="C1.Win.Ribbon.RibbonTextBox.TextAreaWidth.html#C1_Win_Ribbon_RibbonTextBox_TextAreaWidth">TextAreaWidth</a>
        </td>
        <td class="markdown level1 summary"><p>Gets or sets the width of the text area.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Win_Ribbon_RibbonTextBox_TextBox" data-uid="C1.Win.Ribbon.RibbonTextBox.TextBox">
          <a class="xref" href="C1.Win.Ribbon.RibbonTextBox.TextBox.html#C1_Win_Ribbon_RibbonTextBox_TextBox">TextBox</a>
        </td>
        <td class="markdown level1 summary"><p>Gets the TextBox control contained in this <a class="xref" href="C1.Win.Ribbon.RibbonTextBox.html">RibbonTextBox</a>.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Win_Ribbon_RibbonTextBox_UseSystemPasswordChar" data-uid="C1.Win.Ribbon.RibbonTextBox.UseSystemPasswordChar">
          <a class="xref" href="C1.Win.Ribbon.RibbonTextBox.UseSystemPasswordChar.html#C1_Win_Ribbon_RibbonTextBox_UseSystemPasswordChar">UseSystemPasswordChar</a>
        </td>
        <td class="markdown level1 summary"><p>Gets or sets a value indicating whether the text in the <a class="xref" href="C1.Win.Ribbon.RibbonTextBox.html">RibbonTextBox</a> should appear as the default password character.</p>
</td>
      </tr>
    </tbody>
  </table>
  <h3 id="methods">Methods
</h3>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td id="C1_Win_Ribbon_RibbonTextBox_OnChangeCanceled_System_EventArgs_" data-uid="C1.Win.Ribbon.RibbonTextBox.OnChangeCanceled(System.EventArgs)">
          <a class="xref" href="C1.Win.Ribbon.RibbonTextBox.OnChangeCanceled.html#C1_Win_Ribbon_RibbonTextBox_OnChangeCanceled_System_EventArgs_">OnChangeCanceled(EventArgs)</a>
        </td>
        <td class="markdown level1 summary"><p>Raises the <a class="xref" href="C1.Win.Ribbon.RibbonTextBox.ChangeCanceled.html">ChangeCanceled</a> event.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Win_Ribbon_RibbonTextBox_OnChangeCommitted_System_EventArgs_" data-uid="C1.Win.Ribbon.RibbonTextBox.OnChangeCommitted(System.EventArgs)">
          <a class="xref" href="C1.Win.Ribbon.RibbonTextBox.OnChangeCommitted.html#C1_Win_Ribbon_RibbonTextBox_OnChangeCommitted_System_EventArgs_">OnChangeCommitted(EventArgs)</a>
        </td>
        <td class="markdown level1 summary"><p>Raises the <a class="xref" href="C1.Win.Ribbon.RibbonTextBox.ChangeCommitted.html">ChangeCommitted</a> event.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Win_Ribbon_RibbonTextBox_OnGotFocus_System_EventArgs_" data-uid="C1.Win.Ribbon.RibbonTextBox.OnGotFocus(System.EventArgs)">
          <a class="xref" href="C1.Win.Ribbon.RibbonTextBox.OnGotFocus.html#C1_Win_Ribbon_RibbonTextBox_OnGotFocus_System_EventArgs_">OnGotFocus(EventArgs)</a>
        </td>
        <td class="markdown level1 summary"><p>Raises the <a class="xref" href="C1.Win.Ribbon.RibbonTextBox.GotFocus.html">GotFocus</a> event.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Win_Ribbon_RibbonTextBox_OnKeyDown_System_Windows_Forms_KeyEventArgs_" data-uid="C1.Win.Ribbon.RibbonTextBox.OnKeyDown(System.Windows.Forms.KeyEventArgs)">
          <a class="xref" href="C1.Win.Ribbon.RibbonTextBox.OnKeyDown.html#C1_Win_Ribbon_RibbonTextBox_OnKeyDown_System_Windows_Forms_KeyEventArgs_">OnKeyDown(KeyEventArgs)</a>
        </td>
        <td class="markdown level1 summary"><p>Raises the <a class="xref" href="C1.Win.Ribbon.RibbonTextBox.KeyDown.html">KeyDown</a> event.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Win_Ribbon_RibbonTextBox_OnKeyPress_System_Windows_Forms_KeyPressEventArgs_" data-uid="C1.Win.Ribbon.RibbonTextBox.OnKeyPress(System.Windows.Forms.KeyPressEventArgs)">
          <a class="xref" href="C1.Win.Ribbon.RibbonTextBox.OnKeyPress.html#C1_Win_Ribbon_RibbonTextBox_OnKeyPress_System_Windows_Forms_KeyPressEventArgs_">OnKeyPress(KeyPressEventArgs)</a>
        </td>
        <td class="markdown level1 summary"><p>Raises the <a class="xref" href="C1.Win.Ribbon.RibbonTextBox.KeyPress.html">KeyPress</a> event.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Win_Ribbon_RibbonTextBox_OnKeyUp_System_Windows_Forms_KeyEventArgs_" data-uid="C1.Win.Ribbon.RibbonTextBox.OnKeyUp(System.Windows.Forms.KeyEventArgs)">
          <a class="xref" href="C1.Win.Ribbon.RibbonTextBox.OnKeyUp.html#C1_Win_Ribbon_RibbonTextBox_OnKeyUp_System_Windows_Forms_KeyEventArgs_">OnKeyUp(KeyEventArgs)</a>
        </td>
        <td class="markdown level1 summary"><p>Raises the <a class="xref" href="C1.Win.Ribbon.RibbonTextBox.KeyUp.html">KeyUp</a> event.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Win_Ribbon_RibbonTextBox_OnLostFocus_System_EventArgs_" data-uid="C1.Win.Ribbon.RibbonTextBox.OnLostFocus(System.EventArgs)">
          <a class="xref" href="C1.Win.Ribbon.RibbonTextBox.OnLostFocus.html#C1_Win_Ribbon_RibbonTextBox_OnLostFocus_System_EventArgs_">OnLostFocus(EventArgs)</a>
        </td>
        <td class="markdown level1 summary"><p>Raises the <a class="xref" href="C1.Win.Ribbon.RibbonTextBox.LostFocus.html">LostFocus</a> event.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Win_Ribbon_RibbonTextBox_OnTextChanged_System_EventArgs_" data-uid="C1.Win.Ribbon.RibbonTextBox.OnTextChanged(System.EventArgs)">
          <a class="xref" href="C1.Win.Ribbon.RibbonTextBox.OnTextChanged.html#C1_Win_Ribbon_RibbonTextBox_OnTextChanged_System_EventArgs_">OnTextChanged(EventArgs)</a>
        </td>
        <td class="markdown level1 summary"><p>Raises the <a class="xref" href="C1.Win.Ribbon.RibbonTextBox.TextChanged.html">TextChanged</a> event.</p>
</td>
      </tr>
    </tbody>
  </table>
  <h3 id="events">Events
</h3>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td id="C1_Win_Ribbon_RibbonTextBox_ChangeCanceled" data-uid="C1.Win.Ribbon.RibbonTextBox.ChangeCanceled">
          <a class="xref" href="C1.Win.Ribbon.RibbonTextBox.ChangeCanceled.html">ChangeCanceled</a>
        </td>
        <td class="markdown level1 summary"><p>Occurs when the user cancels changes to the text box.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Win_Ribbon_RibbonTextBox_ChangeCommitted" data-uid="C1.Win.Ribbon.RibbonTextBox.ChangeCommitted">
          <a class="xref" href="C1.Win.Ribbon.RibbonTextBox.ChangeCommitted.html">ChangeCommitted</a>
        </td>
        <td class="markdown level1 summary"><p>Occurs when the user commits changes to the text box.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Win_Ribbon_RibbonTextBox_GotFocus" data-uid="C1.Win.Ribbon.RibbonTextBox.GotFocus">
          <a class="xref" href="C1.Win.Ribbon.RibbonTextBox.GotFocus.html">GotFocus</a>
        </td>
        <td class="markdown level1 summary"><p>Occurs when the text box receives focus.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Win_Ribbon_RibbonTextBox_KeyDown" data-uid="C1.Win.Ribbon.RibbonTextBox.KeyDown">
          <a class="xref" href="C1.Win.Ribbon.RibbonTextBox.KeyDown.html">KeyDown</a>
        </td>
        <td class="markdown level1 summary"><p>Occurs when a key is first pressed.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Win_Ribbon_RibbonTextBox_KeyPress" data-uid="C1.Win.Ribbon.RibbonTextBox.KeyPress">
          <a class="xref" href="C1.Win.Ribbon.RibbonTextBox.KeyPress.html">KeyPress</a>
        </td>
        <td class="markdown level1 summary"><p>Occurs when the user presses and releases a key.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Win_Ribbon_RibbonTextBox_KeyUp" data-uid="C1.Win.Ribbon.RibbonTextBox.KeyUp">
          <a class="xref" href="C1.Win.Ribbon.RibbonTextBox.KeyUp.html">KeyUp</a>
        </td>
        <td class="markdown level1 summary"><p>Occurs when a key is released.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Win_Ribbon_RibbonTextBox_LostFocus" data-uid="C1.Win.Ribbon.RibbonTextBox.LostFocus">
          <a class="xref" href="C1.Win.Ribbon.RibbonTextBox.LostFocus.html">LostFocus</a>
        </td>
        <td class="markdown level1 summary"><p>Occurs when the text box loses focus.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Win_Ribbon_RibbonTextBox_TextChanged" data-uid="C1.Win.Ribbon.RibbonTextBox.TextChanged">
          <a class="xref" href="C1.Win.Ribbon.RibbonTextBox.TextChanged.html">TextChanged</a>
        </td>
        <td class="markdown level1 summary"><p>Event raised when the text is changed.</p>
</td>
      </tr>
    </tbody>
  </table>

</div>
