Base class with abstract API for wx.dataview.DataViewIndexListModel and wx.dataview.DataViewVirtualListModel.
Compare |
Compare method that sorts the items by their index. |
GetAttrByRow |
Override this to indicate that the row has special font attributes. |
GetCount |
Returns the number of items (or rows) in the list. |
GetRow |
Returns the position of given item. |
GetValueByRow |
Override this to allow getting values from the model. |
IsEnabledByRow |
Override this if you want to disable specific items. |
SetValueByRow |
Called in order to set a value in the model. |
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.
Parameters: |
|
---|---|
Return type: | 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
.
Parameters: |
|
---|---|
Return type: | bool |
Returns: |
|
See also
GetCount
(self)¶Returns the number of items (or rows) in the list.
Return type: | int |
---|
GetRow
(self, item)¶Returns the position of given item.
Parameters: | item (wx.dataview.DataViewItem) – |
---|---|
Return type: | int |
GetValueByRow
(self, row, col)¶Override this to allow getting values from the model.
Parameters: |
|
---|---|
Return type: | 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.
Parameters: |
|
---|---|
Return type: | bool |
Returns: |
|
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.
Parameters: |
|
---|---|
Return type: | bool |