General information
Category:
Forms & Form designer
Okay, here's what I've come up with..
Format = "$"
Input Mask = "999,999.99" (for this example; "999,999,999,999" should work as well)
SelectOnEntry = .T.
When you type, the commas will show up dynamically every 3 digits. They will be in the wrong place until you're done or press the decimal, however, if you backspace, they will also disappear but when using $$$,$$$,$$$,$$$ for an input mask, with no format, they won't disappear if you backspace a little.
For the GotFocus:
This.SelStart = 0
This.SelLength = (whatever length you need)
Dodefault()
it will then select all when you tab into the box as well as click into it.
So I guess, if you want a "perfect" display, you will have to change the input mask when you GotFocus, and change it back when you LostFocus, as Nick has suggested.
Also, if you type 12 digits and your input mask is $$$,$$$,$$$,$$$ (and no format) you will lose the dollar sign so you need 13 dollar signs. When using Format = "$" and 9's for the input mask, the dollar sign will be added to the front regardless of how many digits you actually have.
I think this pretty much wraps up what ppl have said now, yes? :-)
---
Jonathan Chan
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only