TextField.MaximumCharactersAllowed
From Xojo Documentation
Property (As Integer )
aTextField.MaximumCharactersAllowed = newIntegerValue
or
IntegerValue = aTextField.MaximumCharactersAllowed
New in 2019r2
Supported for all project types and targets.
or
IntegerValue = aTextField.MaximumCharactersAllowed
New in 2019r2
Supported for all project types and targets.
The maximum number of characters allowed in the TextField.
Notes
The value of zero does not limit text. This property works for normal text entry, copy and paste, and drag and drop.
Sample Code
This code is in the Open event of the control. It prohibits more than the specified number of characters:
Me.MaximumCharactersAllowed = 10