"max"
Defines the maximum value that can be entered in a text field.
Synopsis
setValue(string shape, "max", anytype limit);
getValue(string shape, "max", anytype limit);
shape.max( anytype limit);
Parameters
Parameter | Description |
---|---|
shape | Name of the object |
limit | The maximum value |
Description
The attribute "max" sets the maximum value that can be entered in a text field
Example
The following example sets the maximum value to 50. It's not possible to enter a value bigger than 50. If you want to enter e.g. the number 51, the text field accepts the digit 5, however after that the digits 1 to 9 are blocked and won't be accepted by the text field.
main()
{
this.max(50);
}
main()
{
setValue("", "max", 50);
}
Assignment
Text field