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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Adding a page to a Page Frame Control

Status
Not open for further replies.

RandyDeWitt

IS-IT--Management
Dec 16, 2002
14
US
I am using VFP 7.0, service pack 1 with a single form that has a page frame control with 2 pages. On page 1, I have a grid displaying a subset of the data fields. On page 2, I have individual controls whose controlsource match the individual fields in my table.

In the activate method of each page frame, I placed a this.refresh() and a thisform.refresh() command. I also have a this.grid.refresh() command in the page 1 activate method to refresh my grid control.

My problem is, I added a third page to the page frame control by changing the page count property. I then added the same code to the activate method as page 2, but when I change records using the grid and choose page 3, the controls do not refresh until I give each control focus by clicking or tabbing into the individul control.

I am unclear on how to properly add a page to a page frame control so that the individual controls will refresh like the controls on the original two pages.

I would appreciate any help that may be offered. Thank-you.

Randy DeWitt
 
Hi Randy,

Is it possible that the controls you added for page 3 are actually contained on the FORM rather than on the page?

Jim
 
This.refresh() <-- in the activate event of Page3 should be sufficient.

boyd.gif

 
Geoff, Jim and Craig.

Thank-you so much for your quick responses to my question. I have reviewed your posts and confirmed that the controls are truly on the page, not directly on the form and that the correct page is selected when I attempt a this.refresh() command.

Surprisingly, I did a cold boot on my system and a complete project rebuild and then page 3 worked like the other two pages.

I can't explain why or how, but the problem seems to have corrected itself.

I have been a Foxpro 2.6 programmer for many years, going back to basic, Clipper and dbase II. This forumn has been a blessing for me as I strive to learn the nuances of this new program. I appreciate the dedication of the members of this community to share their knowledge with others just learning. Thanks again.
 
RandyDeWitt,

Welcome and glad you were able to get your page to refresh it's contained controls as expected. Glad to hear you've made the leap to VFP, you won't be disappointed. Good luck in your present and future endeavours.

boyd.gif

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top