FMX.Edit.TCustomEdit.MaxLength
Delphi
property MaxLength: Integer read GetMaxLength write SetMaxLength default 0;
C++
__property int MaxLength = {read=GetMaxLength, write=SetMaxLength, default=0};
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
property | public | FMX.Edit.pas FMX.Edit.hpp |
FMX.Edit | TCustomEdit |
Description
Specifies the maximum length of the text entered in this edit control.
Set the MaxLength property in order to limit the maximum length of the text held by this edit control. For instance, if you want to be able to input strings of maximum 5 characters, set MaxLength to 5.
Note that setting MaxLength to a value lower than the length of the actual display text does not affect the display. It only limits the number of characters while typing.