PRB: Cannot Change ActivePage of a PageFrame with a Hot KeyID: Q130349 3.00 WINDOWS
The information in this article applies to:
SYMPTOMSUnder certain circumstances, the activepage of a pageframe object doesn't change when you press a hot key combination for a page.
CAUSEThe pageframe is not the only object on the form.
WORKAROUNDThe pageframe container does not have a keypress method, so you need to modify the keypress method of the form to handle specific hot key combinations as in this example: 1. Create a new form. 2. Add a pageframe control, and change the name property to pgfexample. 3. Set the caption of page1 in pgfexample to Page\<1. 4. Set the caption of page2 in pgfexample to Page\<2. 5. Add the following code to the keypress method of the form:
6. Run the Form. Press ALT+1 to change the active page of the pageframe
STATUSThis behavior is by design.
MORE INFORMATIONThis particular issue occurs only if the form contains objects other than the pageframe. In the example, pressing ALT+1 or ALT+2 would select page1 or page2 without the code if there were no other objects on the form. The code in the keypress event is useful when the form contains objects outside of the pageframe. Additional reference words: 3.00 VFoxWin KBCategory: kbprb KBSubcategory: FxtoolFormdes
|
Last Reviewed: May 22, 1998 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |