Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ActivePage and ThisForm.Refresh Working Together
Message
From
07/08/2001 11:18:56
 
 
To
07/08/2001 11:09:29
Jay Johengen
Altamahaw-Ossipee, North Carolina, United States
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00540716
Message ID:
00540729
Views:
16
I put This.Refresh() in the Page.Activate of my pageframe class.


>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
Craig Berntson
MCSD, Microsoft .Net MVP, Grape City Community Influencer
Previous
Reply
Map
View

Click here to load this message in the networking platform