Defines the maximum number of characters in the control.
Get
| C# | short Limit = object.MaxLength; |
| VB.NET | Limit = object.MaxLength As Short |
| C++ | short Limit = object->MaxLength; short Limit = object->GetMaxLength(); |
| C | HRESULT object->get_MaxLength(short* Limit); |
| VB | Limit = object.MaxLength As Integer |
Put
| C# | short object.MaxLength = Limit; |
| VB.NET | object.MaxLength = Limit As Short |
| C++ | short object->MaxLength = Limit; void object->PutMaxLength(short Limit); |
| C | HRESULT object->put_MaxLength(short Limit); |
| VB | object.MaxLength = Limit As Integer |
object
Limit
Defines the maximum number of characters that can be entered, between 0 and 300. If 0 is specified, the limit is 300.
The MaxLength property defines the maximum number of characters in the control.
The MaxLength property is used to limit the maximum number of characters than can be entered when the control is used as a simple edit control.
The MaxLength property has no effect if the control is used as a Masked Edit control (with Mask). The maximum defined number of characters only applies when the control is used as a simple edit control.
See Also SftMask Object | Object Hierarchy