Through experimentation, I discovered the "method #1" in FAQ #8110, for creating arrays of controls. Some of the top programmers here claim that this method is unsupported - meaning that you might get unexpected results (under certain conditions, or in future versions). Caveat emptor.
>Hi All,
>
>I have a loop which adds objects to a form in the form's INIT event. Is there a way to reference the objects within the loop to adjust their properties (the loop round is part of the property value,) without using macros? The code below works, but, yuch!
>
>
>FOR a=1 TO mn_tot_periods
> obj_name='period'+ALLTRIM(STR(a))
> THISFORM.ADDOBJECT(obj_name,'day_act_shape')
>
> clunky_macro1 = "thisform."+obj_name+".top"
> &clunky_macro1 = (a*19)
>
> clunky_macro2 = "thisform."+obj_name+".visible"
> &clunky_macro2 = .T.
>ENDFOR
>
>
>Thanks!
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)