Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Thisform.Refresh vs This.Refresh (Container)
Message
From
01/11/2005 03:31:22
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01063678
Message ID:
01063921
Views:
13
>>William,
>>
>>I have no explanation. You may want to trace ths container's refresh to verify that all controls' refresh() is fired. You wouldn't have specific code in the container and/or its parent class that has a NODEFAULT somewhere, would you ?
>
>We put wait window in Container's refresh and one of its controls Refresh. The control's refresh wait window never showed up. In other words, the container Refresh is not calling its controls refresh method. There is no custom code in container's refresh method and no code in its subclasses.
>
>The container is instantiated in run-time the first time the page is activated.


I've set up a test. One form, one pageframe.
On page3 first activate, a container (class with one textbox) is added and textbox' controlsource is set
Subsequent activates of page3 call container.activate() which does 'this.Refresh()'

On the form I have also a commandbutton which changes the table (controlsource of container's textbox in page 3)

Deactivating page3, clicking the commandbutton, and then activating page3 is showing the correct value in the containers textbox. - as expected

The container's textbox' Refresh() is called when container.Refresh() is called - as expected

The only thing I can think of is that when you call your containers.Activate(), its parent page is not active - yet

That is the only scenario that (1) does not trigger the container's textbox refresh (since the page is not active) and (2) would explain why a subsequent page.Refresh() or thisform.Refresh() works in your case. The page will be active by then - I guess
Gregory
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform