Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Currency textbox
Message
From
20/07/2001 12:34:33
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00532527
Message ID:
00533233
Views:
10
This message has been marked as a message which has helped to the initial question of the thread.
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
Map
View

Click here to load this message in the networking platform