using a MASK := 000-000-0000;0;_;
hitting the backspace causes the first initial input to land on the second digit.
I cannot reporduce that.
Also there seems to be something wrong with displaying unwanted tail items in the EDIT, like the ";" etc
Indeed that is not Delphi compatible.
This is what I concluded from (I think) Delphi3 help files:
A value for SpaceChar is only valid if also a value for MaskSave is specified
(as by Delphi specifications), so Mask must be at least 4 characters
These must be the last 2 or 4 characters of EditMask (and there must not be
an escape character in front!)
So if a mask ends in ;0;_ then SpaceChar will be _
If a mask ends in ;0; the behaviour is undefined IMO.
It seems like Delphi (7) simply ignores if the last ; if a mask ends in ;
e.g. 'ccc;' is treated as 'ccc' (which is the same as 'ccc;1;_')
'ccc;0;' is treated as 'ccc;0;_'
But then 'ccc;0;_;' the first ; is treated as a maskliteral and the last ; is discarded, the 0 is treated as MaskNoSave
And 'ccc;X;_;' the X is not treated as "not MaskNoSave" (normally anything other than 0 is treated as if it were 1 in that part of the mask).
All in all, it is utterly inconsistent.
At least I cannot mak head or tails of it.
In or implementation the rules are relatively simple:
If the mask ends in ';' + SomeAnsiChar + ';' + SomeAnsiChar and there is no '\' in front of the first ';' then you have defined a value for SpaceChar and wether or not the mask is included when you retrieve the Text
You can omit the last 2 (SomeAnsiChar + ';') and then SpaceChar will be '_' by default.
If you do anything else, all of the ';' will be treated as a mask lilteral.
So unless you can come up with a consistent algorithm how to treat a mask that ends in a ';', I'm not willing to change it ATM.
Bart