Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Using a PageFrame with several tables
Message
De
13/09/2002 17:33:01
 
 
À
13/09/2002 16:01:54
Steven Herbin
SNH Computing Corporation
Swan Lake, New York, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
CodeMine
Divers
Thread ID:
00700329
Message ID:
00700372
Vues:
10
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform