How To Hide Focus on an Active Page Tab in a Pageframe

Last reviewed: January 10, 1997
Article ID: Q156104
The information in this article applies to:
  • Microsoft Visual FoxPro for Windows, version 5.0

SUMMARY

In Visual FoxPro 5.0, when a page within a PageFrame control becomes active, the focus is placed on the caption of the tab of the active page. Visual FoxPro versions 3.0 and 3.0b do not exhibit this behavior.

MORE INFORMATION

The following example shows you how to create a PageFrame control and hide the focus on the caption of the tab of the active page:

  1. Create a form.

  2. Place a Container control onto the form, name it "CONTAINER1," and set the following properties in the Properties window:

          BORDERWIDTH = 0
          LEFT = 60
          TOP = 60
          WIDTH = 348
          HEIGHT = 200
    

  3. Right-click the Container control. On the Shortcut menu, click Edit. Place a PageFrame control into the Container control, and name it "PAGEFRAME1." Set the following properties for the PageFrame control in the Properties window:

          LEFT = 0
          TOP = 0
          WIDTH = 348
          HEIGHT = 200
    

  4. Remove the caption for all pages within the PageFrame control by deleting the value in the Caption property.

    You should have a PageFrame control, with no captions for any of the pages, inside a Container control

  5. Making sure the Container control is in the Edit mode and not the PageFrame control, place two labels where the deleted captions used to be, and name them "LABEL1" and "LABEL2."

  6. Set the Caption property for these two labels to the appropriate value in the Properties window, such as Page1 for LABEL1 and Page2 for LABEL2.

  7. In the Click event of LABEL1, add the following code:

          THISFORM.CONTAINER1.PAGEFRAME1.ACTIVEPAGE = 1
    

    In the Click event for LABLE2, add the following code:

          THISFORM.CONTAINER1.PAGEFRAME1.ACTIVEPAGE = 2
    

  8. Save and run the form.

When you click the tab of the page within the PageFrame control, no focus shows up for the active page tab.


KBCategory: kbtool kbui kbhowto
KBSubcategory: FxtoolFormdes
Additional reference words: 5.00 kbdse VFoxWin



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