Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Dynamically creating objects
Message
 
To
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:
01016622
Views:
8
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
Previous
Reply
Map
View

Click here to load this message in the networking platform