wx.dataview.DataViewIndexListModel is a specialized data model which lets you address an item by its position (row) rather than its wx.dataview.DataViewItem (which you can obtain from this class).
This model also provides its own wx.dataview.DataViewIndexListModel.Compare
method which sorts the model’s data by the index.
This model is not a virtual model since the control stores each wx.dataview.DataViewItem. Use wx.dataview.DataViewVirtualListModel if you need to display millions of items or have other reason to use a virtual control.
See also
wx.dataview.DataViewListModel for the API.
Constructor. |
|
Returns the wx.dataview.DataViewItem at the given row. |
|
Call this after if the data has to be read again from the model. |
|
Call this after a row has been appended to the model. |
|
Call this after a row has been changed. |
|
Call this after a row has been deleted. |
|
Call this after a row has been inserted at the given position. |
|
Call this after a row has been prepended to the model. |
|
Call this after a value has been changed. |
|
Call this after rows have been deleted. |
wx.dataview.
DataViewIndexListModel
(DataViewListModel)¶Possible constructors:
DataViewIndexListModel(initial_size=0)
DataViewIndexListModel is a specialized data model which lets you address an item by its position (row) rather than its DataViewItem (which you can obtain from this class).
__init__
(self, initial_size=0)¶Constructor.
initial_size (int) –
GetItem
(self, row)¶Returns the wx.dataview.DataViewItem at the given row.
row (int) –
Reset
(self, new_size)¶Call this after if the data has to be read again from the model.
This is useful after major changes when calling the methods below (possibly thousands of times) doesn’t make sense.
new_size (int) –
RowAppended
(self)¶Call this after a row has been appended to the model.
RowChanged
(self, row)¶Call this after a row has been changed.
row (int) –
RowDeleted
(self, row)¶Call this after a row has been deleted.
row (int) –
RowInserted
(self, before)¶Call this after a row has been inserted at the given position.
before (int) –
RowPrepended
(self)¶Call this after a row has been prepended to the model.
RowValueChanged
(self, row, col)¶Call this after a value has been changed.
row (int) –
col (int) –
RowsDeleted
(self, rows)¶Call this after rows have been deleted.
The array will internally get copied and sorted in descending order so that the rows with the highest position will be deleted first.
rows (list of integers) –