"selectedPositions"

Returns or sets the numbers of the options selected in a list box.

Synopsis

setValue(string shape, "selectedPositions", dyn_int n);

getValue(string shape, "selectedPositions", dyn_int &n);

shape.selectedPos(dyn_int n);

Parameters

Parameter Description
shape Name of the object
n Index of the selected items, starting with 1

Description

The numbers of the selected options can be set or read with this attribute (the index starts at 1). If the list does not contain any options, the attribute returns -1.

Example

The following example marks the positions 3 and 5 of the selection list as selected.

main()
{
  ...
  setValue("selectionlist1", "selectedPositions", makeDynInt(3,5));
  ...
}

Assignment

Combo box