# RibbonTextBox Class

> The RibbonTextBox class is a control that can be used to display or edit unformatted text. The control is inherited from the System.Windows.Forms.Control class. The following describes only the properties, methods and events defined through the RibbonTextBox class. For a list of properties, methods and events inherited from the System.Windows.Forms.Control class see the .NET Framework reference.

- **Product:** TX Text Control .NET for Windows Forms
- **Section:** Reference
- **Kind:** Class
- **Introduced:** 24.0
- **Namespace:** `TXTextControl.Windows.Forms.Ribbon`
- **Package:** `TXTextControl.TextControl.WinForms.SDK` (assembly `TXTextControl.Windows.Forms.dll`, from the private NuGet feed or Text Control Offline Packages)
- **.NET Framework:** reference `TXTextControl.Windows.Forms.dll` from the setup
- **Inherits:** `System.Windows.Forms.Control`
- **Path:** TX Text Control .NET for Windows Forms > Reference > TXTextControl.Windows.Forms.Ribbon > RibbonTextBox Class
- **1849 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-windows-forms-ribbon/ribbontextbox/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-windows-forms-ribbon/ribbontextbox/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-windows-forms-ribbon/ribbontextbox/llms-full.txt

---

### Description

The RibbonTextBox class is a control that can be used to display or edit unformatted text. The control is inherited from the `System.Windows.Forms.Control` class. The following describes only the properties, methods and events defined through the RibbonTextBox class. For a list of properties, methods and events inherited from the `System.Windows.Forms.Control` class see the .NET Framework reference.

### Syntax

```csharp
public class RibbonTextBox : Control
```

```vbnet
Public Class RibbonTextBox
    Inherits Control
```

### Examples

The following example creates a Ribbon Text Box instance and configures its display mode setting for a document workflow.

```csharp
using TXTextControl.Windows.Forms.Ribbon.RibbonTextBox ribbonTextBox = new();
ribbonTextBox.DisplayMode = TXTextControl.Windows.Forms.Ribbon.IconTextRelation.NoIconLabeled;
```

```vbnet
Dim ribbonTextBox As New TXTextControl.Windows.Forms.Ribbon.RibbonTextBox()
ribbonTextBox.DisplayMode = TXTextControl.Windows.Forms.Ribbon.IconTextRelation.NoIconLabeled
```

---

## In This Section

- [RibbonTextBox Constructor](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-windows-forms-ribbon/ribbontextbox/constructor/llms-full.txt): Initializes a new instance of the RibbonTextBox class.
- [RibbonTextBox.DisplayMode Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-windows-forms-ribbon/ribbontextbox/displaymode-property/llms-full.txt): Sets the RibbonTextBox's superordinate display settings and gets its corresponding text icon relation rendering to the current group's width. The default value is IconTextRelation.SmallIconLabeled.
- [RibbonTextBox.DownButtonClicked Event](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-windows-forms-ribbon/ribbontextbox/downbuttonclicked-event/llms-full.txt): Occurs as the text box's down button is clicked.
- [RibbonTextBox.IsScalable Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-windows-forms-ribbon/ribbontextbox/isscalable-property/llms-full.txt): Gets or sets a value indicating whether the RibbonTextBox changes its display mode when the related ribbon group is scaled by resizing the application. The default value is true.
- [RibbonTextBox.KeyTip Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-windows-forms-ribbon/ribbontextbox/keytip-property/llms-full.txt): Gets or sets the keyboard shortcut of the RibbonTextBox.
- [RibbonTextBox.Label Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-windows-forms-ribbon/ribbontextbox/label-property/llms-full.txt): Gets or sets the text that is displayed before the text box.
- [RibbonTextBox.LargeIcon Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-windows-forms-ribbon/ribbontextbox/largeicon-property/llms-full.txt): Gets or sets a 32x32 1/96 inch icon for this RibbonTextBox. This icon is shown when the DisplayMode property is set to IconTextRelation.LargeIconLabeled.
- [RibbonTextBox.ParentCollection Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-windows-forms-ribbon/ribbontextbox/parentcollection-property/llms-full.txt): Gets the RibbonItemCollection that contains this RibbonTextBox.
- [RibbonTextBox.SelectedText Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-windows-forms-ribbon/ribbontextbox/selectedtext-property/llms-full.txt): Gets or sets the text of the current selection in the text box.
- [RibbonTextBox.SelectionLength Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-windows-forms-ribbon/ribbontextbox/selectionlength-property/llms-full.txt): Gets or sets the number of characters in the current selection in the text box.
- [RibbonTextBox.SelectionStart Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-windows-forms-ribbon/ribbontextbox/selectionstart-property/llms-full.txt): Gets or sets the starting position of the text selected in the text box
- [RibbonTextBox.ShowUpDownButtons Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-windows-forms-ribbon/ribbontextbox/showupdownbuttons-property/llms-full.txt): Gets or sets a value whether the text box's up down buttons are shown or not.
- [RibbonTextBox.SmallIcon Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-windows-forms-ribbon/ribbontextbox/smallicon-property/llms-full.txt): Gets or sets a 16x16 1/96 inch icon for this RibbonTextBox. This icon is shown when the DisplayMode property is set to IconTextRelation.SmallIconLabeled or IconTextRelation.SmallIconUnlabeled.
- [RibbonTextBox.Text Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-windows-forms-ribbon/ribbontextbox/text-property/llms-full.txt): Overridden. Gets or sets the text that is inserted in the text box.
- [RibbonTextBox.TextAlign Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-windows-forms-ribbon/ribbontextbox/textalign-property/llms-full.txt): Gets or sets how text is aligned in the text box. The default value is HorizontalAlignment.Left.
- [RibbonTextBox.TextBoxLabel Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-windows-forms-ribbon/ribbontextbox/textboxlabel-property/llms-full.txt): Gets or sets the text that is displayed behind the text box.
- [RibbonTextBox.TextBoxWidth Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-windows-forms-ribbon/ribbontextbox/textboxwidth-property/llms-full.txt): Gets or sets the width, in 1/96 inch, of the text box. The default value is 50/96 inch.
- [RibbonTextBox.TextValidated Event](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-windows-forms-ribbon/ribbontextbox/textvalidated-event/llms-full.txt): Occurs when text box's text is validated.
- [RibbonTextBox.ToolTip Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-windows-forms-ribbon/ribbontextbox/tooltip-property/llms-full.txt): Gets an object of type RibbonToolTip that displays text when the mouse pointer hovers over the item.
- [RibbonTextBox.UpButtonClicked Event](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-windows-forms-ribbon/ribbontextbox/upbuttonclicked-event/llms-full.txt): Occurs as the text box's up button is clicked.
- [RibbonTextBox.ValidationMode Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-windows-forms-ribbon/ribbontextbox/validationmode-property/llms-full.txt): Gets or sets the RibbonTextBox's input validation mode that is used to validate the inserted text in the text box.

---

## Nearby

- **Previous:** [RibbonTableLayoutTab.RibbonItem Enumeration](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-windows-forms-ribbon/ribbontablelayouttab/ribbonitem-enumeration/llms-full.txt)
- **Next:** [RibbonTextBox Constructor](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-windows-forms-ribbon/ribbontextbox/constructor/llms-full.txt)
