## Package Win32::GUI::Combobox

Back to the Packages

- Constructor

  - new Win32::GUI::Combobox(PARENT, %OPTIONS)

- Methods

  - Add(STRING, STRING .. STRING)

  - AddString(STRING)

  - Clear()

  - Count()

  - FindString(STRING, [INDEX])

  - FindStringExact(STRING, [INDEX])

  - FirstVisibleItem([INDEX])

  - GetString(INDEX)

  - InsertItem(STRING, [INDEX])

  - ItemHeight([HEIGHT])

  - ListIndex()

  - RemoveItem(INDEX)

  - Reset()

  - Select(INDEX)

  - SelectedItem()

- Events

  - Change()

  - GotFocus()

  - LostFocus()

### Constructor

new Win32::GUI::Combobox(PARENT, %OPTIONS)

  Creates a new Combobox object; can also be called as PARENT->AddCombobox(%OPTIONS).

### Methods

Add(STRING, STRING .. STRING)

  Adds one or more items at the end of the control's list.

AddString(STRING)

  Adds an item at the end of the control's list.

Clear()

  See Reset().

Count()

  Returns the number of items in the Combobox.

FindString(STRING, [INDEX])

  Searches the Combobox for an item that begins with the specified STRING. The optional INDEX parameter tells to start the search from the specified position; if no parameter is given, the whole list is searched. Returns the zero-based index of the found item or -1 if no matching item was found.

FindStringExact(STRING, [INDEX])

  Searches the Combobox for an item that exactly matches the specified STRING (case insensitively). The optional INDEX parameter tells to start the search from the specified position; if no parameter is given, the whole list is searched. Returns the zero-based index of the found item or -1 if no matching item was found.

FirstVisibleItem([INDEX])

  Gets the zero-based index of the first visible item in the listbox portion of the Combobox, or sets it to the specified INDEX.

GetString(INDEX)

  Returns the string at the specified zero-based INDEX in the Combobox.

InsertItem(STRING, [INDEX])

  Inserts an item at the specified zero-based INDEX in the Combobox, or adds it at the end if INDEX is not specified.

ItemHeight([HEIGHT])

  Gets or sets the items height in a Combobox.

ListIndex()

  See SelectedItem().

RemoveItem(INDEX)

  Removes the zero-based INDEX item from the Combobox.

Reset()

  Deletes the content of the Combobox.

Select(INDEX)

  Selects the zero-based INDEX item in the Combobox.

SelectedItem()

  Returns the zero-based index of the currently selected item, or -1 if no item is selected.

### Events

Change()

  Sent when the user selects an item from the Combobox

GotFocus()

  Sent when the control is activated.

LostFocus()

  Sent when the control is deactivated.