Equinox Online Help - Language Reference - A to Z

Home

PickListSelection

Applies to
SyntaxPickListSelection iIndex, s
Action[Statement] Once items have been selected from a PickList list, they take an index value starting from 1 which is accessed via the first argument iIndex. The equivalent string value of that index is found in the argument s
ScopeUsable anywhere.
Notes

This statement is used with PickList when PopUpFlags has been set to 64 to create a multi-selectable pick list. PickListSelection has two arguments – the first is the numeric position of the item (in the list of items selected) and the second is the string equivalent of that result.

CategoryPick lists
See Also Pick_PickRecord, PickCaptions, PickColumnWidths, PickFields, PickList, PickRange_PickRecordRange, PickSelection, PickWrite_PickRecordWrite
Example

This example demonstrates a loop through a list of selected items:

number iIndex, iSelections

Repeat
| PopupSize 25, 20, 60, 20
PopupColour 4, 5, 6, 7
PopupTitle "Select A Number"
PopupFlags 64
s = PickList("/One/Two/Three/Four/Five/Six/Seven/Eight", True)
until SysReply <> -1

| Note no. of multiple selections
iSelections = SysResult

iIndex = 0

| Multiple selections ?
if iSelections > 0 then
iIndex = 1
print "There were <" & iSelections & "> selections made"

| Troll through list of selections
while iIndex < iSelections + 1
PickListSelection iIndex, s
print "Selection " & iIndex & " - <" & s & ">, Original Index - <" & SysReply & ">"
iIndex = iIndex + 1
end while
end if