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

# TCustomEdit.MaxLength

MaxLength: maximum length allowed for text string

## Declaration

Source position: stdctrls.pp line 757

`public property TCustomEdit.MaxLength: Integer read FMaxLength write SetMaxLength default 0;`

## Description

MaxLength determines the maximum number of characters allowed in a TCustomEdit. When its value is 0, the user is allowed to enter any number of characters. Unlike VCL, if a text set through the Text property has more characters then MaxLength it will be truncated. It's not possible to implement the VCL behavior due to characteristics of non win32 widgetsets.

The latest version of this document can be found at lazarus-ccr.sourceforge.net .