Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to remove several items in the Listbox ?
Message
De
18/12/2012 04:48:31
 
 
À
18/12/2012 04:46:20
Yim Ming Sun Derek
Spacious Design Consultant
Hong Kong, Hong Kong
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Desktop
Divers
Thread ID:
01559982
Message ID:
01559983
Vues:
54
J'aime (1)
>Hi
>I want to remove several items in the Listbox by the column which have same value
>, for example, I wan to remove all items in the Listbox which column 2's value are equal to "01"
>the code as follow,
>
>
>FOR x = 1 TO thisform.List1.ListCount
>    IF thisform.List1.List[x,2]=="01"
>        thisform.List1.RemoveItem(x) 		
>    ENDIF
>NEXT x
>
>
>But I find that it not work.
>Please advise.
>Derek

You must reverse the For-Next-loop. For X=thisform.List1.ListCoun to 1 step -1
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform