Skip to content

Latest commit

 

History

History
23 lines (15 loc) · 778 Bytes

File metadata and controls

23 lines (15 loc) · 778 Bytes

MaxLength

This property determines the maximum number of characters that can be entered in an edit box or text box.

Usage

oObject.MaxLength = nMaxChars
nMaxChars = oObject.MaxLength

To let the user enter an unlimited number of characters, set MaxLength to 0. When MaxLength is non-zero, additional characters are thrown away. Be careful when you bind controls to fields. If MaxLength is less than the field length (or the current length of a memo field), if you change the data at all, the characters beyond MaxLength may be discarded.

In VFP 3, this property applied only to edit boxes. It was added to text boxes in VFP 5.

Example

This.MaxLength = 400

See Also

EditBox, TextBox