DesktopTextField.MaximumCharactersAllowed

From Xojo Documentation

Property (As Integer )
aDesktopTextField.MaximumCharactersAllowed = newIntegerValue
or
IntegerValue = aDesktopTextField.MaximumCharactersAllowed

New in 2021r3

Supported for all project types and targets.

The maximum number of characters allowed in the DesktopTextField.

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 Opening event of the control. It prohibits more than the specified number of characters:

Me.MaximumCharactersAllowed = 10