choiceseditor

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

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

get_choices()[source]
Return type:a list of (value,name) tuples
get_value()[source]

Get the current value of the combobox

set_choices(choices)[source]
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)[source]

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

Previous topic

charteditor

Next topic

codeeditor

This Page