Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Add CurrentControl
Message
De
29/12/1998 05:44:23
Mark Hall
Independent Developer & Voip Specialist
Keston, Kent, Royaume Uni
 
 
À
28/12/1998 12:33:47
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00170822
Message ID:
00171080
Vues:
32
>I'd like to add more controls to each column of grids on the fly. I can create a name for the new control but what about a class? I'd like to have same class as a default current control. I am not sure if it's possible. If it is then what should I put into this exp.:
>ThisFrom.grdGrid.Column1.AddObject('newcontrolname', )
>Thanks Mark

You could either :-
1) EVALUATE the class of the default control
2) Loop through the columns Controls collection (array) until you find the one with the same name as the default, then grab its Class property.

e.g.
1)
lcClass = EVALUATE( "ThisForm.grdGrid.Column1." +
ThisForm.grdGrid.Column1.CurrentControl + ".class")

Then

ThisForm.grdGrid.Column1.AddObject('newcontrolname', lcClass)
Regards
Mark

Microsoft VFP MCP
Menulib - OO Menus for VFP www.hidb.com/menulib
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform