Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Control array
Message
From
27/04/1998 15:27:10
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00095209
Message ID:
00095228
Views:
24
>Kenneth
>
>In VFP objects within a container must each have unique names. You can add the number of the control in your loop to the name to make it unique.
>
for i = 1 to 3
>   this.AddObject( "Label" + padl( i, 2, '0' ), "label" )
>endfor

>

Thanks. Then how about the parameter nIndex passed to event procedures?
In the Help it says

"Uniquely identifies a control if it is in a control array"

and the definition of control array

"A group of controls that share common names, types, and event procedures. Each control has a unique index. When a control in the array recognizes an event, it calls the event procedure for the group and passes the index as an argument, allowing your code to determine which control recognized the event."

I wonder there must be some way to create such kind of things. The most important things is they share common names, and have a unique index.

Thank you very much.


Kenneth
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform