FIX: Pageframe.Addobject() to a New Page Disables Mouse

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

SYMPTOMS

The Mouse cannot be used to select Textbox objects on a PageFrame's Page if the page and text box were added to the pageframe programatically at run time.

WORKAROUND

Add the following command to the command button's Click event after the text box has been added:

   THISFORM.PAGEFRAME<#>.PAGE<#>.REFRESH

STATUS

Microsoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article. This problem has been fixed in Visual FoxPro 5.0 for Windows.

MORE INFORMATION

Steps to Reproduce Problem

  1. Create a new form, and place a Pageframe on it.

  2. Add a command button to the form, and place the following code in its Click event:

    THISFORM.Pageframe1.Pagecount=3 WITH THISFORM.Pageframe1.Page3

        .Addobject('TEXT1','TEXTBOX')
        .Addobject('TEXT2','TEXTBOX')
    
    ENDWITH

    WITH Thisform.Pageframe1.Page3.text1

        .top=5
        .width=80
        .left=5
        .height=20
        .visible=.t.
        .Controlsource='lctext1'
    
    ENDWITH

    WITH Thisform.Pageframe1.Page3.text2

        .top=30
        .width=80
        .left=5
        .height=20
        .visible=.t.
        .Controlsource='lctext2'
    
    ENDWITH

    * THISFORM.PAGEFRAME1.PAGE3.REFRESH && add this line and mouse will * work properly

  3. Run the form, and select Page 3. Note that you cannot use the mouse to select the text box.


KBCategory: kbtool kbbuglist kbfixlist
KBSubcategory: FxtoolFormdes VFoxWin buglist3.00 buglist3.00b fixlist5.00
Additional reference words: 3.00 3.00b


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: February 20, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.