Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to create controls array?
Message
General information
Forum:
Visual FoxPro
Category:
Object Oriented Programming
Miscellaneous
Thread ID:
00564631
Message ID:
00564660
Views:
17
Hi!

You can do this only programmatically.
In the MSDN July 2001 you can type in index "object arrays, creating" and get a page with help about it.

Following is that help page content:

>>>>
Creating Arrays of Objects
You can also create arrays of objects. For example, MyArray holds five command buttons:

DIMENSION MyArray[5]
FOR x = 1 TO 5
MyArray[x] = CREATEOBJECT("COMMANDBUTTON")
ENDFOR

There are some considerations to keep in mind with arrays of objects:

You can't assign an object to an entire array with one command. You need to assign the object to each member of the array individually.

You can't assign a value to a property of an entire array. The following command would result in an error:
MyArray.Enabled = .F.

When you redimension an object array so that it is larger than the original array, the new elements are initialized to false (.F.), as is the case with all arrays in Visual FoxPro. When you redimension an object array so that it is smaller than the original array, the objects with a subscript greater than the largest new subscript are released.
>>>>>

HTH.

>Could someone tell me how to create a controls array in VFP 6.0?
>
>Many thanks.
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.com
ICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs

It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.
Previous
Reply
Map
View

Click here to load this message in the networking platform