.VectorScript|VectorScript ..VS:Function Reference|Function Reference ..VS:Function_Reference_Appendix|Appendix
DescriptionProcedure GetSelChoice returns the selected value in a VectorScript choice item.
Note that choiceNumber is 1-based for Classic dialogs, and 0-based for Modern dialogs.
VAR choiceNumber :INTEGER;
VAR choiceString :STRING);
def vs.GetSelChoice(item, atChoice): return (choiceNumber, choiceString)
item INTEGER Item ID of dialog control. atChoice INTEGER Position in list where search begins (Pass 0 to retrieve the first one; to retrieve the next one, pass choiceNumber + 1). choiceNumber INTEGER Returns index of selected item in choice list. choiceString STRING Returns string of selected item in choice list.
RemarksNote: Deprecated from VW15+: use GetSelectedChoiceInfo.
Returns the selected value in a combo box. atChoice is where to start looking. It will return the value index (choiceNumber), and the string associated with that index (choiceString).
[jag 2-8-99] GetSelChoice now works with list boxes. Since list boxes can support multiple selections, GetSelChoice can be called repeatedly to retrieve all selections. Pass 0 for atChoice to retrieve the first one, and choiceNumber will contain the index of that item. To retrieve the next one, pass choiceNumber + 1 for atChoice. Repeat this process until -1 is returned for choiceNumber. Also, if no items are selected in the list box, -1 will be returned for choiceNumber.