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

Last reviewed: December 20, 1995
Article ID: Q141397
The information in this article applies to:
  • Microsoft Visual FoxPro for Windows, versions 3.0 and 3.0b

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.

WORKAROUND

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

STATUS

Microsoft is researching this behavior and will post new information here in the Microsoft Knowledge Base as it becomes available.

MORE INFORMATION

Steps to Reproduce the Behavior

  1. Create a new form, and place a pageframe on the form.

  2. Place a text box on Page 2. The text box should be the first item to receive focus when selecting page 2.

  3. Change the following properties of the text box:

    Format=R InputMask=(999)999-9999

  4. 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 "(".

  5. Type: 7045551212, and note that the first number is lost.

Steps to Correct Behavior

  1. Open the form for modification.

  2. Add the following code to the procedure associated with the Activate event of Page 2:

    THIS.Refresh

  3. Run the form. Note that the insertion point is now blinking to the right of "(".

  4. Type 7045551212, and note the first number is not lost.


Additional reference words: 3.00 3.00b VFoxWin
KBCategory: kbtool kbprb
KBSubcategory: FxtoolFormdes


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: December 20, 1995
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.