TX Text Control .NET for Windows Forms

RibbonTextBox Class

Class|Introduced in 24.0
Namespace
TXTextControl.Windows.Forms.Ribbon
Package
TXTextControl.TextControl.WinForms.SDK from the private NuGet feed or Text Control Offline Packages
Assembly
TXTextControl.Windows.Forms.dll
Install
dotnet add package TXTextControl.TextControl.WinForms.SDK .NET 8 and later. For .NET Framework, reference TXTextControl.Windows.Forms.dll from the setup.
Inherits
  1. Control
  2. RibbonTextBox

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

public class RibbonTextBox : Control

Examples

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

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

Members

Constructors

ConstructorDescription
RibbonTextBoxInitializes a new instance of the RibbonTextBox class.

Properties

PropertyDescription
CanSelectNot described in the reference. public bool CanSelect { get; }
DisplayModeSets 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.
EnabledNot described in the reference. public bool Enabled { get; set; }
IsScalableGets 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.
KeyTipGets or sets the keyboard shortcut of the RibbonTextBox.
LabelGets or sets the text that is displayed before the text box.
LargeIconGets or sets a 32x32 1/96 inch icon for this RibbonTextBox. This icon is shown when the DisplayMode property is set to IconTextRelation.LargeIconLabeled.
ParentCollectionGets the RibbonItemCollection that contains this RibbonTextBox.
SelectedTextGets or sets the text of the current selection in the text box.
SelectionLengthGets or sets the number of characters in the current selection in the text box.
SelectionStartGets or sets the starting position of the text selected in the text box
ShowUpDownButtonsGets or sets a value whether the text box's up down buttons are shown or not.
SmallIconGets 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.
TextOverridden. Gets or sets the text that is inserted in the text box.
TextAlignGets or sets how text is aligned in the text box. The default value is HorizontalAlignment.Left.
TextBoxLabelGets or sets the text that is displayed behind the text box.
TextBoxWidthGets or sets the width, in 1/96 inch, of the text box. The default value is 50/96 inch.
ToolTipGets an object of type RibbonToolTip that displays text when the mouse pointer hovers over the item.
ValidationModeGets or sets the RibbonTextBox's input validation mode that is used to validate the inserted text in the text box.
VisibleNot described in the reference. public bool Visible { get; set; }

Events

EventDescription
DownButtonClickedOccurs as the text box's down button is clicked.
TextValidatedOccurs when text box's text is validated.
UpButtonClickedOccurs as the text box's up button is clicked.