Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Dynamically creating objects
Message
 
À
22/05/2005 15:26:41
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 7 SP1
Divers
Thread ID:
01016598
Message ID:
01016622
Vues:
9
You are Welcome, Denis.

I use this trick often. BindEvents In VFP 9.0 isn't optimal for larger quantity objects sometimes.
MartinJ

>Thank you Martin.
>
>>You can create general label class:
>>
>>*form:init()
>>for lnI = 1 to thisform.Something
>>   for lnJ = 1 to thisform.SomethingElse
>>      lcNom_lbl = "lbl_rv_" + alltrim( str( lnI)) + "_" + alltrim( str( lnJ))
>>      lcAddObject = "thisform.AddObject( '" + lcNom_lbl + "', '_xlabel')"
>>      &lcAddObject
>>   endfor
>>endfor
>>
>>*form:label_Click()
>>LPARAM oLabel
>>?oLabel.name
>>
>>
>>* new class
>>define class _xlabel as label
>>   cHookClick="Thisform.label_Click(This)
>>
>>   procedure Click()
>>      =IIF(EMPTY(cHookClick),.T.,EVAL(This.cHookClick))
>>   endproc
>>enddefine
>>
>>
>>MartinJ
"Navision is evil that needs to be erazed... to the ground"

Jabber: gorila@dione.zcu.cz
Jabber? Jabbim
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform