Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ControlCount and Controls
Message
 
 
To
08/11/1999 09:50:57
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00288416
Message ID:
00288433
Views:
16
>Does anyone know of a way to create a control array. Something that I can do
> "object.mycontrol(1).name"
>or
> "object.mycontrol("id").Name"
>
>I know that a control array can do the first one but I don't thing that it could do the last one. Is there a way to code this so that the "mycontrol" could be passed an parameter and still be used as an object.

You do have a ControlCount property on the form, and a Controls collection that you can loop through:
for i = 1 to ThisForm.ControlCount
    oControl = ThisForm.Controls(i)
    ... do something here with oControl
endfor
Mark McCasland
Midlothian, TX USA
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform