Microsoft KB Archive/141397

= PRB: Insertion Point Left of Input Mask in Text Box on Page =

Article ID: 141397

Article Last Modified on 5/7/2003

-

APPLIES TO


 * Microsoft Visual FoxPro 3.0 Standard Edition
 * Microsoft Visual FoxPro 3.0b Standard Edition
 * Microsoft Visual FoxPro 5.0 Standard Edition
 * Microsoft Visual FoxPro 5.0a
 * Microsoft Visual FoxPro 6.0 Professional Edition

-



This article was previously published under Q141397



SYMPTOMS
A text box with an InputMask is placed on a page of a pageframe and the text box gets the focus when the page containing it is activated. Contrary to the input mask, the insertion point inside the text box is aligned to the far left. Any characters typed while the insertion point is to the left of the input mask are lost. This only occurs when the page containing the text box is not the ActivePage when the pageframe is initially displayed.



RESOLUTION
Use THIS.Refresh in the procedure associated with the Activate event of the page containing the text box.



Steps to Reproduce the Behavior
 Create a new form, and place a pageframe on the form. Place a text box on Page 2. The text box should be the first item to receive focus when selecting page 2.  Change the following properties of the text box: Format=R InputMask=(999)999-9999  Run the form, and select Page 2. Note that the insertion point is blinking to the left "(" when it should be to the right of "(". Type: 7045551212, and note that the first number is lost.

Steps to Correct Behavior
 Open the form for modification.</li>  Add the following code to the procedure associated with the Activate event of Page 2: THIS.Refresh </li> Run the form. Note that the insertion point is now blinking to the right of "(".</li> Type 7045551212, and note the first number is not lost.</li></ol>

Additional query words: VFoxWin

Keywords: kbprb KB141397

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.