Class k.i.IEasyCombo(Interface):

Part of kiwi.interfaces
Undocumented
Functionprefill

Fills the Combo with listitems corresponding to the itemdata

Functionappend_item

Adds a single item to the Combo.

Functionclear

Removes all items from the widget

Functionselect

Select an item giving data which could be an object or text.

Functionselect_item_by_position

Selects an item in the combo from a integer where 0

Functionselect_item_by_label

Select item given text.

Functionselect_item_by_data

Select item given data.

Functionget_selected_label

Gets the label of the currently selected item.

Functionget_selected_data

Gets the data of the the currently selected item.

Functionget_selected

Get the text or item of the currently selected item

Functionget_model_stringsUndocumented
Functionget_model_itemsUndocumented
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.

def clear():

Removes all items from the widget

def select(data):

Select an item giving data which could be an object or text.

def select_item_by_position(position):

Selects an item in the combo from a integer where 0 represents the first item.

def select_item_by_label(text):

Select item given text.

def select_item_by_data(data):

Select item given data.

def get_selected_label():

Gets the label of the currently selected item.

def get_selected_data():

Gets the data of the the currently selected item.

def get_selected():

Get the text or item of the currently selected item or None if nothing is selected.

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