Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Using a PageFrame with several tables
Message
From
13/09/2002 17:33:01
 
 
To
13/09/2002 16:01:54
Steven Herbin
SNH Computing Corporation
Swan Lake, New York, United States
General information
Forum:
Visual FoxPro
Category:
CodeMine
Miscellaneous
Thread ID:
00700329
Message ID:
00700372
Views:
9
Hi Steve:

>I want to use 1 set of navigation, new, revert, delete, and save buttons for the screen.

OK.

>My question is: how do I "select" the appropriate table when the page is changed so that the navigation is in the correct table, when I add records, they would be added to the correct table, etc? When I set the cworkarea in the Form, that table stays the selected table for the entire screen.

The best way to do this is to put some code in the pageframe's "AfterPage" method. This event occurs after when a new page is activated. It also occurs when the first page is activated when the form instantiates. So, in this event, just reset the form's cWorkarea dependent on the value of the events nPage parameter.
Lparameter nPage
do case
   case nPage == 1
      thisform.cWorkarea = 'Services'
   case nPage == 2
      thisform.cWorkarea = 'Providers'
   otherwise
     thisform.cWorkarea = 'Doctors'
endcase
You could also specify the cWorkarea properties in the buttons too, but the form's cWorkarea property is the way to go. There are a number of ways to achieve this, but this should give you the idea. For more info, look at the section on pageframes in the 6.1 guide.

HTH








>
>I'll probably slap myself in the head once I get the answer, but I guess I have to ask.
>
>Thanks in advance.
-=Gary
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform