Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Deleting fields on a form programmatically
Message
De
22/08/2008 05:22:17
 
 
À
22/08/2008 05:08:26
Jon Neale
Bond International Software
Wootton Bassett, Royaume Uni
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Vista
Network:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
01340763
Message ID:
01341050
Vues:
11
>Ok, something I wil remember for the future, any particular reason for that?
>
>
Oh, yes.
Each RemoveObject decrements the ControlCount. So you'll end up referencing controls that are no longer there.
It also 'shifts' the objects down. So if there are 4 objects and you remove number 2, then number 3 will become number 2, and number 4 will become number 3

So looping backwards is the only way - unless of course you have two loops where #1 builds a list of objectnames to remove and #2 removes them
Gregory
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform