Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to select item(s) in listbox through code?
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00598526
Message ID:
00598530
Views:
19
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform