Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
ActivePage and ThisForm.Refresh Working Together
Message
De
07/08/2001 11:09:29
Jay Johengen
Altamahaw-Ossipee, Caroline du Nord, États-Unis
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
ActivePage and ThisForm.Refresh Working Together
Divers
Thread ID:
00540716
Message ID:
00540716
Vues:
57
I just discovered that when a ThisForm.Refresh is issued only a pageframe's active page and contents is refreshed; not the other pages. This explains some behaviour I have seen recently regarding the interaction between ActivePage, SetFocus and Refresh. For example:

In ThisForm.PageFrame.Refresh is code to handle the enabling/disabling of page on the frame depending on the value of a form property. If I am on Page1 and click on a button that issues .PageFrame.ActivePage=2 without first issuing a Refresh of the pageframe (or form) then Page2 will not be enabled therefore unable to receive the focus from the button; the focus remains on the button on Page1. If I do issue the pageframe (or form) Refresh before the ActivePage=2 then Page3 will receive the focus and display. Another directly related issue is that when clicking on a button on Page2 that issues a ThisForm.Refresh followed by the ActivePage=1, then the controls on Page1 will not be refreshed as only the active page of the pageframe will be refreshed (in this case, Page2 as it was the active page when the Refresh was issued). This would explain the behaviour of my controls not enabling/disabling as I expected on Page1.



Ok, I'm sure many (most?) of you out there already knew this, and I'm sure the reasons for the default pageframe refresh behaviour is due to performance, but what is the best way to handle it? Do I put code in ThisForm.Refresh to call the refreshes of all the pages on contained pageframes? Sounds a bit heavy as it would get called fairly often. I tried putting a ThisForm.Refresh in each page Activate, but this was not reliable; it didn't always run. Do I call individual object refreshes as needed? This seems like it could become a bit of a maintenance nightmare. Anyone have any suggestions? Or corrections to the behviour as I understand it? Thanks!

Regards, Renoir
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform