### Navigation

- index
- modules |
- next |
- previous |
- Camelot documentation »
- Camelot API »
- view »
- controls »
- editors »

# choiceseditor

class `camelot.view.controls.editors.choiceseditor.``ChoicesEditor`(parent=None, nullable=True, field_name='choices', **kwargs)

  A ComboBox aka Drop Down box that can be assigned a list of keys and values

  `get_choices`()

    Return type: | a list of (value,name) tuples

  `get_value`()

    Get the current value of the combobox

  `set_choices`(choices)

    Parameters: | choices – a list of (value,name) tuples. name will be displayed in the combobox,

    while value will be used within get_value and set_value. This method changes the items in the combo box while preserving the current value, even if this value is not in the new list of choices.

  `set_value`(value)

    Set the current value of the combobox where value, the name displayed is the one that matches the value in the list set with set_choices

### Navigation

- index
- modules |
- next |
- previous |
- Camelot documentation »
- Camelot API »
- view »
- controls »
- editors »

Comments
blog comments powered by Disqus