Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Unexpected Results Display With Input Mask
Message
From
30/09/2004 14:32:00
 
 
To
30/09/2004 14:12:16
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Miscellaneous
Thread ID:
00947608
Message ID:
00947661
Views:
16
This time I tested your code. Yes, it works fine. The difference that I can note is that my controlsource comes from view numeric field. In your code when the text box gains the focus the entire text is selected. Im my code no and as I have said format is KR and SelectedOnEntry = .T..

I think that the main difference is that you have initialized the field as 0 and my code executes append blank in the view. Could be?


>I posted the code because it worked fine for me on my system using the code I posted. Did you try running the code I posted?
>
>
>>Yes, the value is numeric by default and I already was using SelectOnEntry = .T..
>>
>>I have tried Format KR, but nothing different occurs.
>>
>>>Is the value by default numeric? Set the select on entry to Y or delete the 0 when keying the value. Also set the format to R and the input mask to 9,999,999 or whatever.
>>>
>>>PUBLIC oatiform1
>>>oatiform1=NEWOBJECT("TestForm")
>>>oatiform1.Show
>>>RETURN
>>>
>>>
>>>DEFINE CLASS TestForm AS FORM
>>>
>>>
>>>	Height = 171
>>>	Width = 289
>>>	DoCreate = .T.
>>>	nvalue = 0
>>>	Name = "Testform"
>>>
>>>
>>>	ADD OBJECT text1 AS textbox WITH ;
>>>		ControlSource = "thisform.nvalue", ;
>>>		Format = "R", ;
>>>		Height = 23, ;
>>>		InputMask = "9,999,999", ;
>>>		Left = 108, ;
>>>		SelectOnEntry = .T., ;
>>>		Top = 48, ;
>>>		Width = 100, ;
>>>		Name = "Text1"
>>>
>>>
>>>	ADD OBJECT command1 AS commandbutton WITH ;
>>>		Top = 108, ;
>>>		Left = 108, ;
>>>		Height = 27, ;
>>>		Width = 84, ;
>>>		Caption = "Close", ;
>>>		Name = "Command1"
>>>
>>>
>>>	PROCEDURE Unload
>>>		CLEAR EVENTS
>>>		DODEFAULT()
>>>	ENDPROC
>>>
>>>
>>>	PROCEDURE command1.Click
>>>		thisform.release()
>>>	ENDPROC
>>>
>>>
>>>ENDDEFINE
>>>
>>>
>>>>When typing a new value, such as 1, into a blank text box that has an input mask like 9,999,999, an extra zero is added and the value becomes 10 instead 1. The extra zero only appears if I press TAB. When I press ENTER no extra zero appears.
>>>>
>>>>I have been searching at MS KB and I found that message number 191503 is related with my problem. The MS KB says this problem occurs only with VFP 5x. I am using VFP 8 and the problems is similar.
>>>>
>>>>Was not the problem solved? Is there a another way to workaround than MS KB indicate?
Antonio Carlos Kleinübing
Systems Analyst
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform