Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Format function for number
Message
 
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00464207
Message ID:
00464262
Views:
18
Denis, Keep in mind, with James suggestion the value is converted to a string..., so if a numeric is needed you'll have to convert it back... (_assign & _access events could be used)

I normally keep my numerics right justified, but playing for a few minutes shows the same problem you've had. If the length of the bound value is constent eg 5,2 (xx.xx), you can use the InputMask property using 9s (eg 99.99). Unfortunately, if not constant, any extra 9s (in InputMask) show the same behavior, while too few 9s limit your input. Using an InputMask of =replicate("9", transform(< nValue >)) works as long as you don't type a longer value... although you may be able to modify the InputMask property in the textboxes InteractiveChange event
>>Here's an easy one: How do I left justify a (numeric) number in a textbox control on a form - so it has no space before? I assume some format function - but I cant get it to work... THANKS SOMEONE!

>In the init event of the control put:

>This.value = transfo(mycursor.nValue)

Hope this helps...
-michael

My brain hurt like a warehouse, it had no room to spare, I had to cram so many things to store everthing in there. - David Bowie
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform