PRB: Data Entered in Text Box with Mask Differs from Exit Method (192863)
The information in this article applies to:
- Microsoft Visual FoxPro for Windows 6.0
This article was previously published under Q192863 SYMPTOMS
When using an edit mask in a text box on a form, the value of the field is
determined by how the control is exited.
RESOLUTION
One way to work around this problem is to set the SelectOnEntry property of
the textbox to True (.T.) as follows:
********************Begin Sample - 'Works'*************
oX=CREATEOBJECT('myform')
oX.SHOW()
DEFINE CLASS myform AS FORM
WINDOWTYPE=1
ADD OBJECT txt1 AS TEXTBOX WITH VALUE=0,INPUTMASK="99,999,999.99"
ADD OBJECT txt2 AS TEXTBOX WITH ;
TOP=30,VALUE=0,INPUTMASK="99,999,999.99"
PROCEDURE INIT
THIS.txt1.SELECTONENTRY=.T.
THIS.txt2.SELECTONENTRY=.T.
ENDPROC
ENDDEFINE
********************End Sample - 'Works'**************
STATUS
This behavior is by design.
Modification Type: | Major | Last Reviewed: | 12/11/1999 |
---|
Keywords: | kbprb KB192863 kbAudDeveloper |
---|
|