Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Using forms with classes
Message
De
13/12/2003 05:59:11
Paul Trimming
Lonely Pilgrim Shareware
Merstham, Royaume Uni
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Titre:
Using forms with classes
Divers
Thread ID:
00858883
Message ID:
00858883
Vues:
57
Hello,

I am a new Foxpro programmer, unused to using classes. I have saved a form with a grid as a class, but am having difficulty in getting it to display data. I have written the following code:

IN THE MENU
set classlib to frmclass additive
test2 = createobject("frmgridform")
test2.show

IN THE TEST2 INIT FORM METHOD
WITH THISFORM.Grid1
* update the grid record / control source
.RECORDSOURCE = THISFORM.tempfileAlias
.column1.CONTROLSOURCE = exp1table1.fldnumber1
.column2.CONTROLSOURCE = exp1table1.fldpet
ENDWITH

What I don't know is how to open the tempfileAlias database (or is it cursor?), and assign a table and its fields to the grid. I would be very grateful for the code to do this, as well as comments on if I am instantiating the class correctly in the first place.

Many thanks,
Trimtrom
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform