>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