FIX: NODEFAULT in Page's Deactivate Event Activates Wrong TabID: Q143296 3.00 3.00b WINDOWS kbprg kbbuglist kbfixlist The information in this article applies to:
SYMPTOMSUsing NODEFAULT in the Page's Deactivate event stops the current page from changing, but the tab of the page will not be active. Whichever tab is clicked, the tab - 1 is the one that is brought forward. Therefore, if you are located on page one and click the fourth page, tab 3 will be moved to the front yet page one's objects continue to show on the pageframe.
WORKAROUNDMove the NODEFAULT condition to the Activate event of each page. Create one property in the form, and make it store the current page of the pageframe. The default value should be 1. In the Activate event for each page, evaluate the variables to see if the page should come forward. If it shouldn't come forward based on certain conditions, issue the NODEFAULT and set the ACTIVEPAGE to the form property. If the page should come forward, don't use the NODEFAULT clause, and reset the curPage property to the current page. Following is an example of what might be used in the Activate event of the page. CurPage is a form property that stores the current active page in the pageframe. Lexpression is the condition that must be met before the page will activate.
The value of curPage in this code would change to the page's number of the
current Activate event. For example, if this code was in the fourth page of
the pageframe, the code would be as follows:
STATUSMicrosoft 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 Problem1. Create a new form named zJunk. 2. Add a pageframe to the form. 3. Set the PageCount to 4. 4. Add the following code to the Deactivate event of Page1:
5. Add text labels to each of the four pages to identify each page.
6. Save and run the form. 7. Click the Page4 tab. KBCategory: kbprg kbbuglist kbfixlist KBSubcategory: FxprgClassoop VFoxWin buglist3.00 buglist3.00b fixlist5.00 Additional reference words: 3.00 3.00b
|
Last Reviewed: February 23, 1997 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |