It would be really nice to develop a Numeric Input Edit to input of any numeric type (integer, float, number of decimals, formatted or not input), without the need to add as many checks in code.
If you do not mind working with the input box, then the Dialogs library offers that. Example:
B4X:
Dim nd As NumberDialog 'number of digits, default, numb of dec., dec. charact., etc.
nd.Digits = 5 :nd.Number = 0 :nd.Decimal = 2 :nd.DecimalChar=Chr(44)
If you do not mind working with the input box, then the Dialogs library offers that. Example:
B4X:
Dim nd As NumberDialog 'number of digits, default, numb of dec., dec. charact., etc.
nd.Digits = 5 :nd.Number = 0 :nd.Decimal = 2 :nd.DecimalChar=Chr(44)
Ok, but I want to input numbers directly on the input box with all options You mentioned here.
I have already prepared same routines that control the input and format the numbers entered with all the above options, to be included in Sub _TextChanged and _FocusChanged, but I must repeat for each inputbox I declare.
The ideal would be to have a new control, or to extend the inputbox with these routines, but I not know how to do that...