Getting Started with Windows Forms TextBox (TextBoxExt)

This section briefly describes how to create a new Windows Forms project in Visual Studio and add TextBoxExt with its basic functionalities.

Assembly deployment

Refer to the control dependencies section to get the list of assemblies or the details of NuGet package that needs to be added as reference to use the control in any application.

Refer to this documentation to find more details about installing nuget packages in a Windows Forms application.

Adding the TextBoxExt control via designer

1) Create a new Windows Forms application in Visual Studio.

2) Add the TextBoxExt control to an application by dragging it from the toolbox to design view. The following dependent assembly will be added automatically:

  • Syncfusion.Shared.Base

Drag and drop TextBoxExt from toolbox

Adding the TextBoxExt control via code

1) Create a C# or VB application using Visual Studio.

2) Add the following assembly reference to the project:

  • Syncfusion.Shared.Base

3) Include the required namespace.

using Syncfusion.Windows.Forms.Tools;
Imports Syncfusion.Windows.Forms.Tools

4) Create an instance of the TextBoxExt control, and add it to the form.

TextBoxExt textBoxExt1 = new TextBoxExt();
textBoxExt1.Text = "textboxext1";
Dim textBoxExt1 As New TextBoxExt()
textBoxExt1.Text = "textboxext1"

Show the text in WPF TextBoxExt


The size to the TextBoxExt control can be applied using the following properties:

textBoxExt1.MinimumSize = new System.Drawing.Size(267, 104);
textBoxExt1.MaximumSize = new System.Drawing.Size(267, 104);
textBoxExt1.MaximumSize = New System.Drawing.Size(267, 104)
textBoxExt1.MinimumSize = New System.Drawing.Size(267, 104)

Windows Forms TextBoxExt showing size of the control


The TextBoxExt control can be customized to display multiline text using the following properties:

  • Multiline - Spans the text of the edit control to more than one line.
  • WordWrap - Indicates whether the lines are automatically word-wrapped for the multiline edit controls.
  • ScrollBars - Enables scrollbars when the text overflows the size of the text box. The available options are horizontal, vertical, both, and none.
textBoxExt1.Multiline = true;
textBoxExt1.WordWrap = true;
textBoxExt1.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;
textBoxExt1.Multiline = True
textBoxExt1.WordWrap = True
textBoxExt1.ScrollBars = System.Windows.Forms.ScrollBars.Vertical

Windows Forms TextBoxExt shows mulitiline text