Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Grid Display; Picture Mask
Message
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Miscellaneous
Thread ID:
00002755
Message ID:
00002761
Views:
32
>Could some one help me to get a numeric amount
>column to display using the picture format entered
>in the mask property. For instance if I use the
>'XXX,XXX.X' then the coma only displays when the
>column object gets focus. Any help?

Brent:

I've got a price column that I enter information into that gets focus. One of the things that annoyed users and confused them was that the comma came up in the middle and they would get something like 67,8 for 678.00 until they pressed the ENTER key... they thought they were doing something wrong. I saw a fix to that somewhere and thought it might be worthwhile for yourself and others:

First of all, the inputMask = 999,999.99 or whatever...

in the GotFocus method:

This.Tag=This.InputMask
This.InputMask=STRTRAN(This.InputMask,",",SPACE(0))


When the user types in, they'll get a 999999.99 format (no commas).

in the LostFocus method:

This.InputMask=This.Tag
This.Refresh()

restoring it...

Works very well for my application.

Jim.
Previous
Reply
Map
View

Click here to load this message in the networking platform