Package kiwi :: Package ui :: Module combomixin :: Class ComboMixin
[frames | no frames]

Type ComboMixin

object --+
         |
        ComboMixin

Known Subclasses:
ProxyComboBox, ProxyComboBoxEntry, ProxyComboEntry

Our combos always have one model with two columns, one for the string that is displayed and one for the object it cames from.
Method Summary
  append_item(self, label, data)
Adds a single item to the Combo.
  clear(self)
Removes all items from list
  get_model_items(self)
  get_model_strings(self)
  get_selected(self)
  get_selected_data(self)
  get_selected_label(self)
  prefill(self, itemdata, sort)
Fills the Combo with listitems corresponding to the itemdata provided.
  select(self, data)
  select_item_by_data(self, data)
  select_item_by_label(self, label)
  select_item_by_position(self, pos)
  set_mode(self, mode)

Method Details

append_item(self, label, data=None)

Adds a single item to the Combo. Takes:
  • label: a string with the text to be added
  • data: the data to be associated with that item

clear(self)

Removes all items from list

prefill(self, 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

Generated by Epydoc 2.1 on Thu Oct 19 03:18:13 2006 http://epydoc.sf.net