The OpenD Programming Language

ComboboxBase.setSelection

Sets the current selection to an index in the options array, or to the given option if present. Please note that the string version may do a linear lookup.

  1. int setSelection(int idx)
  2. int setSelection(string s)
    class ComboboxBase
    int
    setSelection
    (
    string s
    )

Return Value

Type: int

the index you passed in

Meta

History

The string based overload was added on March 1, 2022 (dub v10.7).

The return value was void prior to March 1, 2022.