RAD Studio VCL Reference
TMemo.MaxLength Property

Specifies the maximum number of characters the user can enter into the edit control.

property MaxLength: Integer;
__property int MaxLength;

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.


Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!