PRB: Controls in a Page Frame Are Not Refreshed (132179)
The information in this article applies to:
- Microsoft Visual FoxPro for Windows 3.0
- Microsoft Visual FoxPro for Windows 5.0
- Microsoft Visual FoxPro for Windows 5.0a
This article was previously published under Q132179 SYMPTOMS
In a page frame, you observe that only the controls placed on the active
page are refreshed when data changes. Controls in underlying pages are not
refreshed until they receive the focus.
CAUSE
For performance reasons, only the active page in a page frame is refreshed
when a form is refreshed. This is by design.
WORKAROUND
Alternatives include explicitly calling the Refresh method for each page
that is to be refreshed. For example, it is possible to define a method
that loops through the pages in a page frame and refreshes all the pages.
The following code sample illustrates this method.
Code Sample
* Call this method ,and pass the name of the page frame as a
* parameter.
* For example,
* Thisform.RefreshAllPages('PageFrame1')
*
PROCEDURE RefreshAllPages
PARAMETER tcPageFrameName
oRef=EVAL('thisform.'+tcPageFrameName)
FOR I=1 TO oRef.PageCount
oRef.Pages(I).Refresh
ENDFOR
Thisform.Refresh
Alternative Workaround
Another alternative is to refresh a page when it becomes active. To
accomplish this, place the following code in the method associated with the
activate event of the page:
This.Refresh
STATUS
This behavior is by design.
Modification Type: | Major | Last Reviewed: | 8/25/1999 |
---|
Keywords: | KB132179 |
---|
|