"min"
Defines the minimum value that can be entered in a text field.
Synopsis
setValue(string shape, "min", anytype limit);
getValue(string shape, "min", anytype limit);
shape.min( anytype limit);
Parameters
| Parameter | Description |
|---|---|
| shape | Name of the object |
| limit | The minimum value |
Details
[d] (integer) or [f] (floating point) — see
Format string. For a text field with floating point format,
invalid digits are blocked during input. For a text field with integer format, values
outside the defined range are not accepted by the text field.The following example sets the minimum value to -5. In this case, after entering "-" the digits from 6 to 9 are blocked and will not be accepted by the text field.
Note that with a minimum value of 10, for example, the values from 0 to 9 can still be used and must be edited manually. This restriction is due to the fact that an entered value that is higher than the minimum value, e.g. 90, would be blocked if the values 0 to 9 cannot be entered.
main()
{
this.min(-5);
}
main()
{
setValue("", "min", -5);
}
