Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Thisform.refresh() not updating pages in pageframe.
Message
From
14/08/1998 08:51:22
Tim Hockin
Illinois State U - Residential Computing
Normal, Illinois, United States
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00125773
Message ID:
00126852
Views:
30
>>I've got a form with a pageframe that contains 9 pages. Each Page has from one to 3 controls on it. In a in the interactive change event of a combo box on the form itself, I am positioning the record pointer and issuing a thisform.refresh(). Only the current visible page is updating. If I switch to different page that page will display old data. Of course when I click a field on the page, the control updates to show current data. Any ideas?


In my base pageframe class, I did this:

*I assume I will never have more than 32 pages - adjust as needed
added custom property PageClean[32]
added custom property refreshAll = .F.
added custom property lastpage = 0

Can you see where it is going? Whenever we change pages (click()) we check if lastpage = activepage. if not, we check whether PageClean[activepage] = .T. if not, we refresh it, and set lastpage to activepage.

the pageframe.refresh() refreshes the activepage, and marks all other pages (for each oPage in THIS.Pages) as dirty. Now they refresh only if a page refresh has been called, and when they are selected.

I also added refreshAll as an option that will refresh ALL pages in the pgf.REFRESH() method.

This has been quite successful for me. I can post the entire code for this class, if anyone needs the details.

Tim
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform