Subject EditEnh and decimal separator problem
Author mmenaz@lycosmail.com
I've tested the EditEnh edit mask behaviour regarding currency input.
With the standard edit mask, "!\$-999],999],990!.00", there is the
problem of decimal separator that is due to my keyboard layout. You
have to know that, for istance, here in Italy the decimal separator is
"," while the numeric keyboard has the standard ".". So while your
control expects the "," for decimal separator, user presses "." since
it's on the numeric pad and is widely used with pocked calculator and
programs like Excell (that make the conversion from "." to ","). I
must add that the right separator "," is hard to find, since is near
the "m" key on the alphabetic part of the keyboard.
For instance, the code I used for a component I made is:
procedure TMmCustomComboEdit.KeyPress(var Key: Char);
begin
inherited KeyPress(Key);
if (Key in ['.', ',']) and (EditType in [etFloat, etCurrency]) then
Key := DecimalSeparator;
...
end;

This translates two widely used separators to the localized one so the
user can press one of the two. Or you could simply have:

procedure TMmCustomComboEdit.KeyPress(var Key: Char);
begin
inherited KeyPress(Key);
if (Key = '.') and (EditType in [etFloat, etCurrency]) then
Key := DecimalSeparator;
...
end;

Belive me, the "." key is really widely put into the numeric keypad,
while localized decimal separator can be different in many many
countries. With this change the control could be better usable all
over the world (don't forget IB_EditEnh).

Marco Menardi