Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
FOR EACH....
Message
 
À
23/06/1998 17:43:50
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00111062
Message ID:
00111077
Vues:
20
>Hi Everyone!
>It seems like I still don't understand how this thing works. It simple when we have an array like Example says, but if I want to use form's collection like Objects or Controls.
>For example I want to Remove All objects on a form, I was trying to do something like:
>
>FOR EACH oControl IN ThisForm.Controls
>ThisForm.RemoveObject(oControl.Name)
>ENDIF
>Of course it's not working and I'm not suprised, but it's very interesting how this thing suppoused to be to get it work.
>Thanks!

Actually it is working if you replace ENDIF with ENDFOR. :)
I placed your code in Form.DblClick() and it worked. The funny thing I noticed that the objects didn't disappear all at once - I had to doubleclick 3-4 times to have them all gone.

Nick
Nick Neklioudov
Universal Thread Consultant
3 times Microsoft MVP - Visual FoxPro

"I have not failed. I've just found 10,000 ways that don't work." - Thomas Edison
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform