Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
AddObject/RemoveObject
Message
De
26/03/2002 05:41:07
 
 
À
25/03/2002 10:58:29
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00635975
Message ID:
00637146
Vues:
18
>Len, the following sample code will first create 10 objects on the form, and then delete object #5. It so happens that changing the ZOrder is equivalent to changing the "creation order"!
>
>
>ThisForm.AddProperty("aOptions(10)")
>for i = 1 to 10
>	ThisForm.AddObject("aOptions(i)", "CheckBox")
>	ThisForm.aOptions(i).Top = i * 20
>	ThisForm.aOptions(i).Left = 100
>	ThisForm.aOptions(i).Caption = "Option " + trans(i)
>	ThisForm.aOptions(i).Visible = .T.
>next
>ThisForm.aOptions(5).ZOrder(1)
>ThisForm.RemoveObject("aOptions")
>
Thanks for the update, don't forget to add it to the FAQ, it makes the array solution workable again (at least for me).
Len Speed
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform