Base class with abstract API for wx.dataview.DataViewIndexListModel and wx.dataview.DataViewVirtualListModel.
wx.dataview.DataViewIndexListModel, wx.dataview.DataViewVirtualListModel
Compare method that sorts the items by their index. |
|
Override this to indicate that the row has special font attributes. |
|
Returns the number of items (or rows) in the list. |
|
Returns the position of given item. |
|
Override this to allow getting values from the model. |
|
Override this if you want to disable specific items. |
|
Called in order to set a value in the model. |
See |
wx.dataview.
DataViewListModel
(DataViewModel)¶Base class with abstract API for DataViewIndexListModel and DataViewVirtualListModel.
Compare
(self, item1, item2, column, ascending)¶Compare method that sorts the items by their index.
item1 (wx.dataview.DataViewItem) –
item2 (wx.dataview.DataViewItem) –
column (int) –
ascending (bool) –
int
GetAttrByRow
(self, row, col, attr)¶Override this to indicate that the row has special font attributes.
This only affects the DataViewTextRendererText() renderer.
The base class version always simply returns False
.
row (int) – The row for which the attribute is requested.
col (int) – The column for which the attribute is requested.
attr (wx.dataview.DataViewItemAttr) – The attribute to be filled in if the function returns True
.
bool
True
if this item has an attribute or False
otherwise.
See also
GetCount
(self)¶Returns the number of items (or rows) in the list.
int
GetRow
(self, item)¶Returns the position of given item.
item (wx.dataview.DataViewItem) –
int
GetValueByRow
(self, row, col)¶Override this to allow getting values from the model.
row (int) –
col (int) –
variant
IsEnabledByRow
(self, row, col)¶Override this if you want to disable specific items.
The base class version always returns True
, thus making all items enabled by default.
row (int) – The row of the item whose enabled status is requested.
col (int) – The column of the item whose enabled status is requested.
bool
True
if the item at this row and column should be enabled, False
otherwise.
New in version 2.9.2.
Note
See wx.dataview.DataViewModel.IsEnabled
for the current status of support for disabling the items under different platforms.
SetValueByRow
(self, variant, row, col)¶Called in order to set a value in the model.
variant (DVCVariant) –
row (int) –
col (int) –
bool