EditBox.SetRange
The EditBox.SetRange function allows the script to set an Edit Box to only allow numerical entries within a defined range.
Syntax |
ControlObject.SetRange(Min,Max) Where ControlObject is the name of the variable (declared in your script) that is used to store the EditBox Control Object that is returned by the AddEditBox function. |
Description |
Sets the Edit Box to only allow numerical entries within a defined range. A spin-box is added to the Edit Box to allow users to scroll through the available settings. |
Arguments |
Min {integer} Defines the lowest number permitted in the Edit Box.
Max {integer} Defines the highest number permitted in the Edit Box. |
Returns |
Integer. |
Example:
EditBox1.SetRange 3,50
Where:
- EditBox1 is the name of the variable that stores the EditBox Control Object returned by the AddEditBox function
- 3 is the lowest permitted entry
- 50 is the highest permitted entry.