Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Numeric Textbox Woes
Message
From
03/07/1998 21:58:43
Larry Long
ProgRes (Programming Resources)
Georgia, United States
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00114109
Message ID:
00114175
Views:
20
>>I have a textbox that is not bound, I assign its initial value to 0. I have Format of K and SelOnEntry set to .t. The behaviour I am getting is any number I type in then hit the decimal point gets appended in front of the 0. For example, if I type 5. the 5 appends to the 0 to give 50. It takes a little effort to do this because of the Select On Entry, but I know a user can make just about anything happen. All it really takes is for the user to hit the END key, HOME key, LEFT or RIGHT arrow, and the SelOnEntry is gone, the cursor is now to the left of the 0. In FP 2.x, the behaviour was what I desired, typing in a number plus the decimal point completely replaced whatever was on the left of the decimal.
>>
>>How do you make this work properly?
>>
>>TIA!
>Mark,
>
>I've just uploaded a vcx with a numeric textbox class in it. It will take a while before it shows up so I am also sending it to you by email. This class allows numeric entry like a calculator where the numbers come in from the right. The decimal point is placed automatically based on the input mask of the textbox.
I've been having the same problem. I put

keyboard "{HOME}"+"{SHIFT+END}"

in the gotfocus method and it seems to work ok for me
HTH
//:^)
L.A.Long
ProgRes
lalong1@charter.net
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform