pyface.list_box_model module

The model for list boxes.

class pyface.list_box_model.ListModelEvent[source]

Bases: object

Information about list model changes.

class pyface.list_box_model.ListBoxModel[source]

Bases: HasTraits

The model for list boxes.

list_changed = Event()

Fired when the contents of the list have changed.

get_item_count()[source]

Get the number of items in the list.

Returns

item_count – The number of items in the list.

Return type

int

get_item_at(index)[source]

Returns the item at the specified index.

Parameters

index (int) – The index to return the value of.

Returns

label, item – The user-visible string and model data of the item.

Return type

str, any

fire_list_changed()[source]

Invoke this method when the list has changed.