Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to select item(s) in listbox through code?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00598526
Message ID:
00598530
Vues:
17
This message has been marked as the solution to the initial question of the thread.
>My form has a listbox with multiselect on and I want to programatically select various items on the list.
>
>I have tried several ways to do this without success. It must be easy. Help!
* loop over the array, checking each item against the given list
	for n = 1 to m.lnLen				&& cycle over rows
		if at(.btcValArray[m.n, 2], m.list_arg)>0     && this item is to be selected
			.Container1.List1.selected(m.n) = .t.	&& flag list item as Selected
		endif
	endfor
So, just set selected property to true for your items.
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform