Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Thisform.refresh() not updating pages in pageframe.
Message
 
 
À
14/08/1998 08:51:22
Tim Hockin
Illinois State U - Residential Computing
Normal, Illinois, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00125773
Message ID:
00126890
Vues:
42
Tim,

Go to my website and look at the Q&A, OOP article qOOP013. The Page refresher class only takes 4 lines of code in the pageframe subclass Init() and you never have to do any more with it at runtime. The PageRefresher object handles the refresh issue itself.

>>>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
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform