Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Refreshing the entire pageframe
Message
From
04/02/2009 10:09:26
 
 
To
04/02/2009 09:56:43
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01379213
Message ID:
01379218
Views:
19
>I want to refresh ever page of a pageframe by using the following code.
>
>FOR lnI = 1 TO this.PageCount
>	lcPageRefresh = "this.page"+TRANSFORM(lnI)+".refresh()"
>	&lcPageRefresh.
>ENDFOR
>
>
>It works fine until I came across a pageframe with one of its page named "pgSomething" instead of the default pageX, where X=the page number.
>
>How do I reference the "pgSomething" page to refresh it.
>
>TIA

I'm tempted to answer 'why?' but that drives me nuts when others do it to me. I assume you have a good reason for wanting to refresh every page in a pageframe that is not active instead of using the activate of the page so that it refreshes when it is active. You could try putting a control on every page in the init and use the uienable to handle it during a standard refresh instead.

There's a VFE example here:
http://fox.wikis.com/wc.dll?Wiki~AutoPageRefresher~VFP

I recommend reading these for other ideas:
http://www.inquiry.com/techtips/vfox_pro/10min/10min0400/10min0400.asp
http://www.inquiry.com/techtips/vfox_pro/10min/10min0300/10min0300.asp

and this for an overview:

http://www.viafox.nl/articles/Activate%20the%20Refresh%20-%20English.html

The MSFT recommendation:

http://support.microsoft.com/kb/132179
* Call this method ,and pass the name of the page frame as a
* parameter.
* For example,
*    Thisform.RefreshAllPages('PageFrame1')
*
PROCEDURE RefreshAllPages
PARAMETER tcPageFrameName
oRef=EVAL('thisform.'+tcPageFrameName)
FOR I=1 TO oRef.PageCount
   oRef.Pages(I).Refresh
ENDFOR
Thisform.Refresh
.·*´¨)
.·`TCH
(..·*

010000110101001101101000011000010111001001110000010011110111001001000010011101010111001101110100
"When the debate is lost, slander becomes the tool of the loser." - Socrates
Vita contingit, Vive cum eo. (Life Happens, Live With it.)
"Life is not measured by the number of breaths we take, but by the moments that take our breath away." -- author unknown
"De omnibus dubitandum"
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform