Hello GetMem,
my package facilitates the controlled entry of numbers.
Can you provide it in the Online Package Manager?
Greetings Roland
Here is a brief description:
--------------------------------------------------------------------------------------------------------------------------
DecimalNumberEdit is a component for entering numbers.
--------------------------------------------------------------------------------------------------------------------------
The input field only accepts valid numbers that can be limited using the Matrix property.
The component provides four new properties.
1. Matrix (string)
This property defines the number format.
Examples:
99.99 Allows you to enter values in the range from 0 to 99.99 with two decimal places.
-50.9 Allows you to enter values in the range from -50.9 to 50.9 with one decimal place.
250,000 Allows you to enter values in the range from 0 to 250 with three decimal places.
-500 Allows the entry of values in the range from -500 to 500 without decimal places.
2. Value (Extended)
Returns the extended value of the entered value.
This value can be evaluated during input and represents the value currently entered in the input field.
3. EnterKey (Boolean)
Allows the use of the Enter key in the same way as the Tab key.
4. WarningTone (Boolean)
Emits a warning tone if impermissible entries are made.
The localization settings such as the DecimalSeparator is automatically adopted.
Should the project also use the localization settings under Linux / Unix,
you should add the entry clocale to the project uses.
Example:
uses
{$ IFDEF UNIX} {$ IFNDEF DARWIN}
clocale, // sets the localization settings (number, date and time formats)
{$ ENDIF} {$ ENDIF}
SysUtils, Forms, ......
--------------------------------------------------------------------------------------------------------------------------
NumberEdit is a component for entering whole numbers.
--------------------------------------------------------------------------------------------------------------------------
The input field only accepts the digits 0-9, leading zeros are also permitted.
The component provides two new properties.
1. EnterKey (Boolean)
Allows the use of the Enter key in the same way as the Tab key.
2. WarningTone (Boolean)
Emits a warning tone if impermissible entries are made.