VS:GetSelChoice

From Vectorworks Developer
Jump to: navigation, search

.VectorScript|VectorScript ..VS:Function Reference|Function Reference ..VS:Function_Reference_Appendix|Appendix

Description

Procedure 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.

PROCEDURE GetSelChoice(
item  :INTEGER;
atChoice  :INTEGER;
VAR choiceNumber  :INTEGER;
VAR choiceString  :STRING);
def vs.GetSelChoice(item, atChoice):
    return (choiceNumber, choiceString)

Parameters

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.

Remarks

Note: 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).

[sd 8/19/98]

[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.

Version

Availability: from VectorWorks 8.0. Deprecated from VW 15+.
Personal tools
NamespacesFFFF

Variants
Actions
Advanced Search
See Also
Navigation
Toolbox