Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Control Arrays
Message
 
 
À
18/07/2001 10:42:43
Information générale
Forum:
Visual FoxPro
Catégorie:
Programmation Orientée Object
Titre:
Divers
Thread ID:
00530471
Message ID:
00532078
Vues:
17
Mitch,

No, you can't. AddObject() simply puts an object of the given name into the container. Once it's in there you can scan the Objects[] collection to find it:
for each loObject in this.Objects
   if ( loObject.Name == "text123" )
      ? "found it"
      loObject.Left = loObject.Left + 10 && move it
   endif
endfor
Can you give more information about why you specifically need to use control arrays? With the SetAll() method and the above for loop you can do most anything to the objects that you'd want to do. (I'm not a VB guy so I don't know exactly how control arrays are used in VB)

>The problem is you can't specify an element of a control array using .AddObject
>Right?
>
>
>this.AddObject( "text123", "textbox" )
>with this.text123
> .Top = 50
> .Left = 200
> .Visible = .t.
>endwith
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform