Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Refreshing multiple Page Frames in Visual FP v5.0

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
0
0
I have created a form with multiple Page Frames. When adding a new record, the current page is the only page that the refresh method effects. Can someone advise me on a way to refresh the entire form.
 
Gene,

The reason the only page refreshed is the visible is that it takes time to refresh things and only one page is visible to the user. There are two approaches that I use to address this situation, one slightly more complicated, but better I beleive, than the other.

The simple one;

In each Pages Activate event place this line of code;

This.Refresh()

This will refresh each page as the user makes it visible. It has the benefit of NOT rereshing pages the user cannot see until they try to look at them.

The second approach, that I usually use, is this. I have a label class named lblPageRefresher that is has its Visible Proeprty set to .F. and has this code in its UIEnable event;

IF lEnable
This.Parent.Refresh()
ENDIF

I place one of these on each page of my pageframes. This label will fire its UIEnable event whenever the visibility of its page changes, that is the page is entered or left. The LEnable argument is .T. when the page is becoming visible, so when that happens the labe will cause the page to be refreshed.

JimB

JimBooth
jbooth@jamesbooth.com
 
You might also consider wrapping the refresh in a lockscreen. This will speed up the refresh and make it look much smoother to the user. The code I usually use looks something like this.

In the activate of the page.

local llocked
llocked = thisform.lockscreen
thisform.lockscreen = .t.
** put any other code here
this.refresh
thisform.lockscreen = llocked




 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top