Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VFP5 - 12 0.00 gets 120.00 in numeric object
Message
From
31/07/1998 19:54:37
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00121694
Message ID:
00123233
Views:
20
Dana,

Is there more to it? I've tried and tried and I can't get the situation you describe to happen. With SelectOnEntry = .T., when I tab into the field, the entire field is hilighted, and typing 1.95 produces 1.95 with no fuss or bother. The problem only seems to arise when I click into the field rather than tab into it.

Do you have other code in the field's methods? Say the click, or the gotfocus for example, that might be interfering. Or is there code in the parent class that might be causing the interference?

In any event, I found that putting "This.SetFocus()" into the GotFocus event solved the problem. Now whether I tab or click into the field, it is entirely hilighted, and the 1st keystroke replaces everything. If I want to position, I just reposition the cursor and click again. So far, it works like a charm. Sounds like maybe this could cause a recursion problem, but not so.

I'm not convinced there is anything for version 6 to 'fix'. Then again, I'm not entirely convinced about that Gallileo guy's quack theories either. ;)

Alan

>>If you put your This.SetFocus() into the GotFocus() event instead of the Click(), and use a K in the Format property of the textbox, you will get the desired effect on entering the textbox - even using a mouseclick, but the user will still be able to position the cursor with a second mouseclick.
>>
>>>I fixed this problem by putting
>>>THIS.SETFOCUS()
>>>in the click method.
>>
>>>>I don't think VFP5 handles numeric values in textboxes incorrrectly, just not necessarily the way we might want it to. Ther problem has to do with the value not being selected when the user starts typing. It usually show up if the mouse is used to get to the textbox. With a tab ito the textbox the SelectOnEntry property will contrl the selection adn any typing would overwrite the current value.
>
>
>This subject had come up a couple of months ago. I have seen the problem, and it has nothing to do with the mouse. I had a form with some numeric fields, and when entering a new record, and use the TAB key to get into the field, when entering a one, then a period, then a decimal value, the value would end up being ten and the decimal (ie. 1.95 would end up 10.95). To keep this from happening, you'd have to enter the one, then the period, then hit the BackSpace key and hit the periosd again. Very annoying, and if you're a touch typist and not looking at the screen, you get a big surprise. I finally ended up putting some basic KEYBOARD commands in to fix it. (By the way, I did have the field defined as Select On Entry).
>
>I wonder if this will be fixed in 6.0?
>
>Dana
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform