Vcl.ExtCtrls.TLabeledEdit.MaxLength
Delphi
property MaxLength: Integer read FMaxLength write SetMaxLength default 0;
C++
__property MaxLength = {default=0};
Properties
| Type | Visibility | Source | Unit | Parent |
|---|---|---|---|---|
| property | published | Vcl.ExtCtrls.pas Vcl.ExtCtrls.hpp |
Vcl.ExtCtrls | TLabeledEdit |
Description
Specifies the maximum number of characters the user can enter into the edit control. {{#multireplace:Vcl.ExtCtrls.TLabeledEdit.MaxLength|H21=!|H25=%|H28=(|H29=)|H2A=*|H2B=+|H2F=/|H3C=<|H3D==|H3E=>|H5B=[|H5D=]|H5E=^|H7C=|}} inherits from {{#multireplace:Vcl.StdCtrls.TCustomEdit.MaxLength|H21=!|H25=%|H28=(|H29=)|H2A=*|H2B=+|H2F=/|H3C=<|H3D==|H3E=>|H5B=[|H5D=]|H5E=^|H7C=|}}. All content below this line refers to {{#multireplace:Vcl.StdCtrls.TCustomEdit.MaxLength|H21=!|H25=%|H28=(|H29=)|H2A=*|H2B=+|H2F=/|H3C=<|H3D==|H3E=>|H5B=[|H5D=]|H5E=^|H7C=|}}.
Specifies the maximum number of characters the user can enter into the edit control.
Use MaxLength to limit the number of characters that can be entered into the edit control. A value of 0 indicates that there is no application-defined limit on the length.
Use MaxLength to limit the length of the text in an edit control if that text will be copied into a fixed-length buffer.
Note: Setting MaxLength will not truncate the existing text, it merely prevents the user from adding more text after reaching the limit of MaxLength characters.
Note: Even when MaxLength is 0, there may be limitations imposed by the operating system on the number of characters that may be entered into an edit control.
Note: The unit of MaxLength is characters (not bytes) if the application is using themes.
See Also