System.Windows.Forms
1.0.5000.0
2.0.0.0
System.Windows.Forms.TextBoxBase
With the control, the user can enter text in an application. This control has additional functionality that is not found in the standard Windows text box control, including multiline editing and password character masking.
Typically, a control is used to display, or accept as input, a single line of text. You can use the and properties to enable multiple lines of text to be displayed or entered. Set the and properties to true to enable greater text manipulation in a multiline control.
You must set the property to true to adjust the height of the control. You can adjust the height by setting the property.
You can limit the amount of text entered into a control by setting the property to a specific number of characters. controls can also be used to accept passwords and other sensitive information. You can use the property to mask characters entered in a single-line version of the control. Use the property to enable the user to type only uppercase, only lowercase, or a combination of uppercase and lowercase characters into the control.
To scroll the contents of the until the cursor (caret) is within the visible region of the control, you can use the method. To select a range of text in the text box, you can use the method.
To restrict text from being entered in a control, you can create an event handler for the event in order to validate each character entered in the control. You can also restrict all entry of data in a control by setting the property to true.
Most of the functionality of the control is inherited from the class.
Using the control with visual styles enabled will cause the incorrect handling of surrogate fonts.
Represents a Windows text box control.
Constructor
The parent container control defines the color and font settings for the .
Initializes a new instance of the class.
1.0.5000.0
2.0.0.0
Property
System.ComponentModel.DefaultValue(false)
System.Boolean
To be added.
If the value of this property is false, the user must press CTRL+ENTER to create a new line in a multiline control. If there is no default button for the form, the ENTER key will always create a new line of text in the control, regardless of the value of this property.
Gets or sets a value indicating whether pressing ENTER in a multiline control creates a new line of text in the control or activates the default button for the form.
1.0.5000.0
2.0.0.0
Property
2.0.0.0
System.ComponentModel.Editor("System.Windows.Forms.Design.ListControlStringCollectionEditor, System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "System.Drawing.Design.UITypeEditor, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")
System.ComponentModel.Localizable(true)
System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Always)
System.ComponentModel.Browsable(true)
System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content)
System.Windows.Forms.AutoCompleteStringCollection
To be added.
Use the , , and properties to create a that automatically completes input strings by comparing the prefix being entered to the prefixes of all strings in a maintained source. This is useful for controls in which URLs, addresses, file names, or commands will be frequently entered.
The use of the property is optional, but you must set the property to CustomSource in order to use .
You must use the and properties together.
The operating system might limit the number of custom strings that it can display at once.
Gets or sets a custom to use when the property is set to CustomSource.
Property
2.0.0.0
System.ComponentModel.DefaultValue(System.Windows.Forms.AutoCompleteMode.None)
System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Always)
System.ComponentModel.Browsable(true)
System.Windows.Forms.AutoCompleteMode
To be added.
Use the , , and properties to create a that automatically completes input strings by comparing the prefix being entered to the prefixes of all strings in a maintained source. This is useful for controls in which URLs, addresses, file names, or commands will be frequently entered.
The use of the property is optional, but you must set the property to CustomSource in order to use .
You must use the and properties together.
The operating system might limit the number of custom strings that it can display at once.
Gets or sets an option that controls how automatic completion works for the .
Property
2.0.0.0
System.ComponentModel.TypeConverter(typeof(System.Windows.Forms.TextBoxAutoCompleteSourceConverter))
System.ComponentModel.DefaultValue(System.Windows.Forms.AutoCompleteSource.None)
System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Always)
System.ComponentModel.Browsable(true)
System.Windows.Forms.AutoCompleteSource
To be added.
Use the , , and properties to create a that automatically completes input strings by comparing the prefix being entered to the prefixes of all strings in a maintained source. This is useful for controls in which URLs, addresses, file names, or commands will be frequently entered.
The use of the property is optional, but you must set the property to CustomSource in order to use .
You must use the and properties together.
does not work on multiline controls.
The operating system might limit the number of custom strings that can be displayed at once.
Gets or sets a value specifying the source of complete strings used for automatic completion.
Property
System.ComponentModel.DefaultValue(System.Windows.Forms.CharacterCasing.Normal)
System.Windows.Forms.CharacterCasing
To be added.
You can use the property to change the case of characters as required by your application. For example, you could change the case of all characters entered in a control used for password entry to uppercase or lowercase to enforce a policy for passwords.
Gets or sets whether the control modifies the case of characters as they are typed.
1.0.5000.0
2.0.0.0
Property
System.Windows.Forms.CreateParams
To be added.
To be added.
Gets the required creation parameters when the control handle is created.
1.0.5000.0
2.0.0.0
Property
System.Windows.Forms.ImeMode
To be added.
To be added.
To be added.
1.0.5000.0
2.0.0.0
Method
2.0.0.0
System.Void
This method is called by the public Dispose method and the method. Dispose invokes the protected Dispose(Boolean) method with the parameter set to true. invokes Dispose with set to false.
When the parameter is true, this method releases all resources held by any managed objects that this references. This method invokes the Dispose method of each referenced object.
Releases the unmanaged resources used by the and optionally releases the managed resources.
true to release both managed and unmanaged resources; false to release only unmanaged resources.
Method
System.Boolean
The method returns true when includes the value and the property is true.
Determines whether the specified key is an input key or a special key that requires preprocessing.
true if the specified key is an input key; otherwise, false.
One of the key's values.
1.0.5000.0
2.0.0.0
Property
System.Boolean
To be added.
does not work on multiline controls. Additionally, the CTRL+A keyboard shortcut does not work on multiline controls, regardless of the property value.
When the font is changed, any indentation that you have defined does not appear. To get indentation, set to true and override WM_SETFONT without calling the base class so that SETMARGINS is not called.
Gets or sets a value indicating whether this is a multiline control.
1.0.5000.0
2.0.0.0
Method
2.0.0.0
System.Void
Raising an event invokes the event handler through a delegate. For more information, see Raising an Event.
The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.
Raises the event.
An that contains the event data.
Method
2.0.0.0
System.Void
Raising an event invokes the event handler through a delegate. For more information, see Raising an Event.
The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.
Raises the event.
An that contains the event data.
Method
System.Void
When the user selects text in a control, the control saves the selection. When a control gets focus, the selection is the same as when the loses focus. When the gets focus for the first time, the entire text is selected.
Raising an event invokes the event handler through a delegate. For more information, see Raising an Event.
The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.
Raises the event.
An that contains the event data.
1.0.5000.0
2.0.0.0
Method
System.Void
To be added.
Raises the event.
The event data.
1.0.5000.0
2.0.0.0
Method
2.0.0.0
System.Void
Raising an event invokes the event handler through a delegate. For more information, see Raising an Event.
The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.
Raises the event.
An that contains the event data.
Method
System.Void
To be added.
To be added.
To be added.
1.0.5000.0
Method
System.Void
Raising an event invokes the event handler through a delegate. For more information, see Raising an Event.
The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.
Raises the event.
An that contains the event data.
1.0.5000.0
2.0.0.0
Property
System.ComponentModel.RefreshProperties(System.ComponentModel.RefreshProperties.Repaint)
System.ComponentModel.DefaultValue('\0')
System.ComponentModel.Localizable(true)
System.Char
To be added.
The property has precedence over the property. Whenever the is set to true, the default system password character is used and any character set by is ignored.
When the property is set, cut and copy actions in the control using the keyboard cannot be performed.
When the is in password mode because , , or is true, the is in restricted mode. In this mode, the is disabled, but the current is cached so that it can be restored if the ever becomes unrestricted. Toggling the is a common scenario. The is shadowed while the control is in restricted mode. From the designer perspective, the value shown is the actual value.
Gets or sets the character used to mask characters of a password in a single-line control.
1.0.5000.0
2.0.0.0
Method
2.0.0.0
System.Void
Unlike setting , does not affect the Clipboard.
Sets the selected text to the specified text without clearing the undo buffer.
The text to replace.
Property
System.ComponentModel.Localizable(true)
System.ComponentModel.DefaultValue(System.Windows.Forms.ScrollBars.None)
System.Windows.Forms.ScrollBars
To be added.
Horizontal scroll bars will not be shown if the property is set to true, regardless of the value of the property.
Gets or sets which scroll bars should appear in a multiline control.
1.0.5000.0
2.0.0.0
Property
System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)
System.ComponentModel.Browsable(false)
System.Int32
To be added.
To be added.
To be added.
1.0.5000.0
2.0.0.0
Property
System.String
To be added.
To be added.
Gets or sets the current text in the .
1.0.5000.0
2.0.0.0
Property
System.ComponentModel.Localizable(true)
System.ComponentModel.DefaultValue(System.Windows.Forms.HorizontalAlignment.Left)
System.Windows.Forms.HorizontalAlignment
To be added.
You can use this property to align the text within a to match the layout of text on your form. For example, if your controls are all located on the right side of the form, you can set the property to HorizontalAlignment.Right, and the text will be aligned with the right side of the control instead of the default left alignment.
Gets or sets how text is aligned in a control.
1.0.5000.0
2.0.0.0
Event
System.EventHandler
For more information about handling events, see Consuming Events.
Occurs when the value of the property has changed.
1.0.5000.0
2.0.0.0
Property
System.ComponentModel.RefreshProperties(System.ComponentModel.RefreshProperties.Repaint)
System.ComponentModel.DefaultValue(false)
System.Boolean
To be added.
The property has precedence over the property. Whenever the is set to true, the default system password character is used and any character set by is ignored.
When the is in password mode because , , or is true, the is in restricted mode. In this mode, the is disabled, but the current is cached so that it can be restored if the ever becomes unrestricted. Toggling the is a common scenario. The is shadowed while the control is in restricted mode. From the designer perspective, the value shown is the actual value.
Gets or sets a value indicating whether the text in the control should appear as the default password character.
2.0.0.0
Method
System.Void
To be added.
To be added.
To be added.
1.0.5000.0
2.0.0.0
System.ComponentModel.Designer("System.Windows.Forms.Design.TextBoxDesigner, System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "System.ComponentModel.Design.IDesigner")
System.Runtime.InteropServices.ClassInterface(System.Runtime.InteropServices.ClassInterfaceType.AutoDispatch)
System.Runtime.InteropServices.ComVisible(true)