Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
AddObject/RemoveObject
Message
 
 
À
25/03/2002 10:16:00
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:
00636839
Vues:
21
>>>>Hi Jim,
>>>>
>>>>>Hilmar's method of using AddObject DOES work correctly, without need to clean up yourself. VfP unfortunately modifies the names of the objects it adds to the form, so the RemoveObject does not find them again - but they are still in the Controls array & are correctly cleaned up on releasing the form.
>>>>
>>>>So there's no way to get rid of the controls, once they were added?
>>>>
>>>>Regards,
>>>>Armin
>>>
>>>Only sequentially as Sergey pointed out - repeated calls to RemoveObject( "alabels" ) removes them 1 at a time from first to last (or last to first, I didn't check further).
>>
>>It removes them in the order they were created.
>
>I tried "RemoveObject" yesterday, with my array, and it didn't remove anything.
>
>Note that I updated my FAQ #8110, to include caveats and alternative methods.
>
>Hilmar.

You can remove them one by one if you use array name as a control name. In case of the code from your faq
FOR i=1 TO ALEN(aOptions)
  Thisform.RemoveObject("aoptions")
ENDIF
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform