Do you know the Windows Calculator? When using the keyboard only numeric keys, comma/point and backspace are available. Simple, safe and effective to enter numbers. The numbers are always right aligned and no cursor has to be used.
That´s the way the NUMGETC control (NUmeric GET Calculator) is working.
You define it with
Code: Select all
DEFINE NUMGETC oNumGet1
ROW 20
COL 420
WIDTH 160
HEIGHT 20
FORMAT "."
THOUSENDS .F.
DECIMALS 2
END NUMGETC
When THOUSENDS are set to .T. you see the thousends delimiter (even at the input).
With DECIMALS you set the number of decimals than can be used.
No coursor, no copy, no paste support - I wanted to keep it simple.
And not perfect - I hate it when you enter the field using Tab key and the existing number is marked. Perhaps someone find a way to get rid of it.
Ricci