Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Best way to remove items from a multi-select list.
Message
De
20/10/1999 14:12:31
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Best way to remove items from a multi-select list.
Divers
Thread ID:
00278995
Message ID:
00278995
Vues:
54
I wanted a method to remove all the items selected in a multi-select list. I ended up doing the following. I tried using the RemoveListItem, but since this is based on NewItemId which is constantly changing, the code became fairly convoluted.
WITH THIS.Parent.lstModelFee

	lnTotFees = .ListCount
	lnFeeSelected = 1
	FOR lnCurFee = 1 TO lnTotFees
		IF .Selected[ lnFeeSelected ]
			lnNodeId = VAL(.List[ lnFeeSelected, 4 ])
			THISFORM.mpRemoveFromList ( lnNodeId )

			.RemoveItem( lnFeeSelected )
		ELSE
			lnFeeSelected = lnFeeSelected + 1
		ENDIF	
	ENDFOR
	
ENDWITH

THIS.Enabled = .F.
Répondre
Fil
Voir

Click here to load this message in the networking platform