Information générale
Catégorie:
Gestionnaire d'écran & Écrans
>>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
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement