phoenix_title wx.dataview.DataViewListStore

wx.dataview.DataViewListStore is a specialised wx.dataview.DataViewModel for storing a simple table of data.

Since it derives from wx.dataview.DataViewIndexListModel its data is be accessed by row (i.e. by index) instead of only by wx.dataview.DataViewItem.

This class actually stores the values (therefore its name) and implements all virtual methods from the base classes so it can be used directly without having to derive any class from it, but it is mostly used from within wx.dataview.DataViewListCtrl.


class_hierarchy Class Hierarchy

Inheritance diagram for class DataViewListStore:

method_summary Methods Summary

__init__

Constructor.

AppendColumn

Appends a data column.

AppendItem

Appends an item (=row) and fills it with values.

DeleteAllItems

Delete all item (=all rows) in the store.

DeleteItem

Delete the item (=row) at position pos.

GetItemCount

Returns the number of items (=rows) in the control.

GetItemData

Returns the client data associated with the item.

GetValueByRow

Overridden from wx.dataview.DataViewIndexListModel.

InsertColumn

Inserts a data column before pos.

InsertItem

Inserts an item (=row) and fills it with values.

PrependColumn

Prepends a data column.

PrependItem

Prepends an item (=row) and fills it with values.

SetItemData

Sets the client data associated with the item.

SetValueByRow

Overridden from wx.dataview.DataViewIndexListModel.


property_summary Properties Summary

ItemCount

See GetItemCount


api Class API

class wx.dataview.DataViewListStore(DataViewIndexListModel)

Possible constructors:

DataViewListStore() -> None

DataViewListStore is a specialised DataViewModel for storing a simple table of data.


Methods

__init__(self)

Constructor.

Return type:

None



AppendColumn(self, varianttype : str)

Appends a data column.

variantype indicates the type of values store in the column.

This does not automatically fill in any (default) values in rows which exist in the store already.

Parameters:

varianttype (string) –

Return type:

None



AppendItem(self, values : VariantVector, data: Optional[UIntPtr]=None)

Appends an item (=row) and fills it with values.

The values must match the values specifies in the column in number and type. No (default) values are filled in automatically.

Parameters:
  • values (VariantVector) –

  • data (wx.UIntPtr) –

Return type:

None



DeleteAllItems(self)

Delete all item (=all rows) in the store.

Return type:

None



DeleteItem(self, pos : int)

Delete the item (=row) at position pos.

Parameters:

pos

Return type:

None



GetItemCount(self)

Returns the number of items (=rows) in the control.

Return type:

int

New in version 2.9.4.



GetItemData(self, item : DataViewItem)

Returns the client data associated with the item.

Parameters:

item (wx.dataview.DataViewItem) –

Return type:

wx.UIntPtr

New in version 2.9.4.

See also

SetItemData



GetValueByRow(self, row : int, col : int)

Overridden from wx.dataview.DataViewIndexListModel.

Parameters:
  • row (int) –

  • col (int) –

Return type:

DVCVariant



InsertColumn(self, pos : int, varianttype : str)

Inserts a data column before pos.

variantype indicates the type of values store in the column.

This does not automatically fill in any (default) values in rows which exist in the store already.

Parameters:
  • pos (int) –

  • varianttype (string) –

Return type:

None



InsertItem(self, row : int, values : VariantVector, data: Optional[UIntPtr]=None)

Inserts an item (=row) and fills it with values.

The values must match the values specifies in the column in number and type. No (default) values are filled in automatically.

Parameters:
  • row (int) –

  • values (VariantVector) –

  • data (wx.UIntPtr) –

Return type:

None



PrependColumn(self, varianttype : str)

Prepends a data column.

variantype indicates the type of values store in the column.

This does not automatically fill in any (default) values in rows which exist in the store already.

Parameters:

varianttype (string) –

Return type:

None



PrependItem(self, values : VariantVector, data: Optional[UIntPtr]=None)

Prepends an item (=row) and fills it with values.

The values must match the values specifies in the column in number and type. No (default) values are filled in automatically.

Parameters:
  • values (VariantVector) –

  • data (wx.UIntPtr) –

Return type:

None



SetItemData(self, item : DataViewItem, data : UIntPtr)

Sets the client data associated with the item.

Notice that this class does not take ownership of the passed in pointer and will not delete it.

Parameters:
Return type:

None

New in version 2.9.4.

See also

GetItemData



SetValueByRow(self, value : DVCVariant, row : int, col : int)

Overridden from wx.dataview.DataViewIndexListModel.

Parameters:
  • value (DVCVariant) –

  • row (int) –

  • col (int) –

Return type:

bool


Properties

ItemCount

See GetItemCount