# Class k.i.IEasyCombo(Interface):

Part of kiwi.interfaces View In Hierarchy

No class docstring

Method | prefill | Fills the Combo with listitems corresponding to the itemdata
Method | append_item | Adds a single item to the Combo.
Method | clear | Removes all items from the widget
Method | select | Select an item giving data which could be an object or text.
Method | select_item_by_position | Selects an item in the combo from a integer where 0
Method | select_item_by_label | Select item given text.
Method | select_item_by_data | Select item given data.
Method | get_selected_label | Gets the label of the currently selected item.
Method | get_selected_data | Gets the data of the the currently selected item.
Method | get_selected | Get the text or item of the currently selected item
Method | get_model_strings | Undocumented
Method | get_model_items | Undocumented

Inherited from Interface:

Class Method | providedBy | Undocumented

def prefill(itemdata, sort=False):

Fills the Combo with listitems corresponding to the itemdata provided.

Parameters:

- itemdata is a list of strings or tuples, each item corresponding to a listitem. The simple list format is as follows:

      >>> [ label0, label1, label2 ]

  If you require a data item to be specified for each item, use a 2-item tuple for each element. The format is as follows:

      >>> [ ( label0, data0 ), (label1, data1), ... ]

- Sort is a boolean that specifies if the list is to be sorted by label or not. By default it is not sorted

def append_item(label, data=None):
Adds a single item to the Combo.

Parameters | label | a string with the text to be added
| data | the data to be associated with that item

def clear():
Removes all items from the widget

def select(data):
Select an item giving data which could be an object or text.

Parameters | data | data or text to select

def select_item_by_position(position):
Selects an item in the combo from a integer where 0 represents the first item.

Parameters | position | an integer

def select_item_by_label(text):
Select item given text.

Parameters | text | text to select

def select_item_by_data(data):
Select item given data.

Parameters | data | object to select

def get_selected_label():
Gets the label of the currently selected item.

Returns | the selected label.

def get_selected_data():
Gets the data of the the currently selected item.

Returns | the selected data.

def get_selected():
Get the text or item of the currently selected item or None if nothing is selected.

Returns | selected text or item or None.

def get_model_strings():
Undocumented
def get_model_items():
Undocumented