Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Input mask like a calculator for a numeric textfield
Message
From
29/07/1999 11:55:29
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00247677
Message ID:
00247723
Views:
26
Hmmm, maybe we should combine the two (Jim's box and this idea to allow numeric expressions.) That would give a "true" calculator type box that we could upload here.

I was missing converting the expression back to a string. Thanks for pointing it out! :-)

>>>Go to Files, Classes/VCX. Jim Booth has a textbox number class which what you are looking for. There is also a second one called Textnum2 or something like that which is a modification of Jim's. Look for #'s 803 and 806.
>>
>That is a cool idea. I placed the following in the LostFocus of a textbox with no mask, and it works:
>if type('eval(This.value)') = "N"
>   This.Value = alltrim(str(eval(This.Value)))
>endif
>The trick may be to always treat the before and after value as character. I also would manually bind this to a field. Perhaps in the textbox Refresh, put: this.value = somefield [convert to character if needed]. Add to the lost focus, replace somefield with this.value [convert back to numeric if needed].
--Todd Sherman
-Wake Up! Smell the Coffee!
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform