# DSelector (of `Control`)

class `DSelector`

  Defined in DialogControls.sc.

  A selector control that lets the player choose from a list of text strings.

Subclasses: `FileSelector`.

## Properties

Inherited from `Control`:

Property | Description
--- | ---
type |
state |
nsTop |
nsLeft |
nsBottom |
nsRight |
key | The keyboard key associated with this control.
said |
value | Arbitrary value associated with this control.
name |

Defined in DSelector:

Property | Description
--- | ---
font |
x |
y |
text |
cursor |
topString |
mark |

## Methods

`handleEvent`(pEvent)

`setSize`()

`indexOf`(findText)

  Returns the index of specified string in the list of items. If the string is not an item in the list, it returns -1.

  Parameters: | findText (string) – The text to search for.

`at`(index)

  Returns the text at the specified position in the list.

  Parameters: | index (number) – The index into the list.
  Returns: | A pointer to the text.

`advance`(amount)

  Increments the selected item’s index by amount.

`retreat`(amount)

  Decrements the selected item’s index by amount.