ToolStripTextBox::MaxLength Property
.NET Framework (current version)
Gets or sets the maximum number of characters the user can type or paste into the text box control.
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
Property Value
Type: System::Int32The number of characters that can be entered into the control. The default is 32767 characters.
You can use this property to restrict the length of text entered in the control for values such as postal codes and telephone numbers, or to restrict the length of text entered when the data is to be entered in a database. You can limit the text entered into the control to the maximum length of the corresponding field in the database.
The following code example demonstrates the syntax for setting various ToolStripTextBox common property settings, including the MaxLength property .
.NET Framework
Available since 2.0
Available since 2.0
Show: