text: A widget that provides a drop-down combo-box control. More...
  #include <Wt/WComboBox>
  A widget that provides a drop-down combo-box control.
  A combo box provides the user with a set of options, from which one option may be selected.
  WComboBox is an MVC view class, using a simple string list model by default. The model may be populated using addItem(const WString&) or insertItem(int, const WString&) and the contents can be cleared through clear(). These methods manipulate the underlying model().
  To use the combo box with a custom model instead of the default WStringListModel, use setModel().
  To react to selection events, connect to the changed(), activated() or sactivated() signals.
  At all times, the current selection index is available through currentIndex() and the current selection text using currentText().
  WComboBox does not have support for auto-completion, this behaviour can be found in the WSuggestionPopup.
  Usage example:
  WComboBox is an inline widget.
  The widget corresponds to the HTML
  <select> tag and does not provide styling. It can be styled using inline or external CSS as appropriate.
  Signal emitted when the selection changed.
  The newly selected item is passed as an argument.
  Adds an option item.
  Equivalent to insertItem (count(),
  text).
  Returns the currently selected item.
  If no item is currently selected, the method returns -1.
  By default, for a combo box, the first item is selected, and thus currentIndex() = 0, while for a selection box no item is selected.
  Returns the text of the currently selected item.
  Inserts an item at the specified position.
  The item is inserted in the underlying model at position
  index. This requires that the model() is editable.
  Returns the text of a particular item.
  Returns the data model.
  Returns whether 'no selection' is a valid state.
  Refresh the widget.
  The refresh method is invoked when the locale is changed using WApplication::setLocale() or when the user hit the refresh button.
  The widget must actualize its contents in response.
  Reimplemented from Wt::WFormWidget.
  Removes the item at the specified position.
  The item is removed from the underlying model. This requires that the model() is editable.
  Signal emitted when the selection changed.
  The newly selected text is passed as an argument.
  Returns the selection mode.
  Always returns SingleSelection for a combo box, but may return ExtendedSelection for a selection box
  Reimplemented in Wt::WSelectionBox.
  Changes the current selection.
  Specify a value of -1 for
  index to clear the selection.
  Sets the model to be used for the items.
  The
  model may not be 0, and ownership of the model is not transferred.
  The default value is a WStringListModel that is owned by the combo box. Items in the model can be grouped by setting the LevelRole. The contents is interpreted by Wt::asString, and subsequent items of the same group are rendered as children of a HTML
  <optgroup> element.
  Sets the column in the model to be used for the items.
  The column
  index in the model will be used to retrieve data.
  The default value is 0.
  Enables the ability to have 'no currently selected' item.
  The setting may only be changed for a combo box (and not for a selection box). When enabled, the currentIndex() may be '-1' also when the combo box contains values. The user can however not select this option, it is thus only useful as a default value.
  By default, no selection is
  false for a combo-box and
  true for a selection box.
  Sets the current value.
  Sets the current index to the item corresponding to
  value.
  Implements Wt::WFormWidget.
  Returns the current value.
  Returns currentText() converted from a WString to a string.
  Implements Wt::WFormWidget.