Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Dynamically creating objects
Message
From
22/05/2005 15:26:41
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 7 SP1
Miscellaneous
Thread ID:
01016598
Message ID:
01016618
Views:
7
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
*******************************************************
Save a tree, eat a beaver.
Denis Chassé
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform