ComponentOne True DBInput Pro 8.0
MaxLength Property (TDBText)

 

Reference> TDBText Control> TDBText Control Properties> MaxLength Property (TDBText)

MaxLength Property (TDBText)

Syntax

object.MaxLength= long

Read/Write at run time and design time.

Values

0 is the default

Remarks

The MaxLength property allows you to limit the number of characters a user can enter in the control. The default value will be set to 0, which will not limit any amount of characters. Any number greater than 0 indicates the maximum number of characters.

The maximum number set to the MaxLength is dependent to the LengthAsByte property, which determines the length of the number either based on characters or bytes. If LengthAsByte is set True, the number set to the MaxLength will be handled in bytes. However, if LengthAsByte property is set to False, the maximum number will be handled in characters.

If assigning a text string that exceeds the length of the maximum characters in the Text property, the extra characters will be truncated. Changing this property does not affect the current contents of the control but will affect any subsequent changes to the contents.

The SelStart and the SelLength properties will be handle based on characters in all cases.

By setting the MaxLength to 0, the number of characters entered in the control will not be restricted. However, this will vary depending upon the available system resources.

See Also

LengthAsByte Property (TDBText)

Text Property (TDBText)

SelStart Property (TDBText)

SelLength Property (TDBText)

 

 


Copyright (c) GrapeCity, inc. All rights reserved.

Product Support Forum  |  Documentation Feedback