Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Is it possible to use a variable value in .ControlName?
Message
From
26/11/2002 10:38:23
 
 
To
26/11/2002 09:59:45
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
General information
Forum:
Visual FoxPro
Category:
Object Oriented Programming
Miscellaneous
Thread ID:
00726887
Message ID:
00727020
Views:
17
Hilmar,

Another way to do it with out macro substitution...using this method would even allow for methods of the object to be called.
for nField = 1 to 48
    oTextBox = eval("thisform.text"+ transform(i))
    oTextBox.value = "Value :" + transform(i)
next i
>>Without macro substitution...
>>
>>
>>for FieldNum = 1 to 48
>>  STORE FieldNum TO ("ThisForm.Text" + trans(FieldNum)+".Value")
>>next
>>
>
>Interesting - I thought that macro substitution could not be avoided in this case. Thanks for the information.
>
>Hilmar.
Steve Gibson
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform