>I have a problem with a text box I am using to enter an amount adding a zero. For example, if I enter 25.35 the text box show 250.35. When I press the decimal place it adds the zero. I have the input mask setup as 9999999.99 and the format is K (select on entry) I have changed a bunch of other things but nothing seems to work. This is for VFP 5.
I've seen this a lot when inputmask was having separators (comma for thousands). The solution was to remove the separator in the .gotfocus and put it back in .lostfocus; for that, I've added a property .SaveMask to the textbox:
With This
If "9,9" $ this.inputmask
.SavePicture=.InputMask
.selectonentry=.t.
.InputMask=Chrt(.InputMask, ",", "")
.refresh
endif
EndWith
With This
If !empty(.SavePicture)
.InputMask=.SavePicture
.savepicture=""
.refresh
endif
EndWith
And yes, this was in VFP5. I haven't removed the code in later versions, because it just worked.
Now if you're saying the inputmask is "9999999.99" and not "9,999,999.99" (which was causing the problems in my case), I don't really know what's wrong. I hope this would give you at least a starting point.