Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Creating Grid with n-columns and n-methods
Message
 
À
29/01/2006 09:20:18
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Versions des environnements
Visual FoxPro:
VFP 6 SP3
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Divers
Thread ID:
01091251
Message ID:
01091405
Vues:
10
Zlatko,

What you want to do is create a Column class that has your procedure code defined in it. Then, create your Grid class with code in its Init that does something like this:
FOR i = 1 TO this.ColumnCount
  this.AddObject('Column' + TRANSFORM(i), 'yourColumnClass')
  STORE .t. TO ('this.Column' + TRANSFORM(i) + '.Visible')
ENDFOR
Something along those lines should get you going.

HTH,
Chad

>I'd like to create a grid programatically and it works fine with
>
>DEFINE CLASS ...
> add object ...
>
> procedure ...

>
>statements. But when I try to put a FOR...ENDFOR loop for adding more objects, it doesn't work because this statement is not allowed in a class definiton.
>
>So, how can I easily create a grid with n-columns and n-procedures (click, right-cklick events...) at run-time?
>
>
>Thank's, Zlatko.
_________________________________
There are 2 types of people in the world:
    Those who need closure
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform