[Overview][Constants][Types][Classes][Procedures and functions][Index] | Reference for unit 'MaskEdit' (#lcl)

# TCustomMaskEdit.MaxLength

Indicates the maximum number of characters that can be stored in the value for the control.

## Declaration

Source position: maskedit.pp line 306

`protected property TCustomMaskEdit.MaxLength : Integer read GetMaxLength write SetMaxLength;`

## Description

MaxLength is an Integer property that represents the maximum number of characters that can be stored in the edit control. TCustomMaskEdit re-implements the read and write access specifiers for the property to provide support for use of an edit mask in the control.

Setting a new value for the property causes the internal length for the edit mask to be used as the value property. The specified Value is discarded when IsMasked is True. Otherwise, the new Value is stored using the inherited property accessor.

## See also

TCustomEdit.MaxLength |  | The maximum length of the value entered in Text, or 0 (zero) for unlimited length.