FoxPro 2 doesn't support multiple select lists natively. As I remember, even if you define the list FROM POPUP and set MULTISELECT in the popup the listbox will not support it.
Here is how I got around it. I chose a character to indicate the list item was selected and appended it to the item in the array.
Here is the code - assuming:
nValue = Numeric value of list box
cMark = The character which indicates the list item is selected
aList = array of list items
NOTE-Define the array so the first character of each list item is a space.
Toggle the selection in the valid clause:
IF LEFT(aList(nValue),1) = cMark
aList(nValue) = ' ' + SUBSTR(aList(nValue),2)
ELSE
aList(nValue) = cMark + SUBSTR(aList(nValue),2)
ENDIF
To determine which items were selected, loop through aList looking for rows with cMark as the first character.
If you are using a proportional font in FoxPro for Windows, you may want to pad the list items with two spaces to make things line up better and change the VALID code accordingly.
>I have a screen that displays an array in a list box. How do I set the list box up to allow user to select more than one?
David.