Class defining sort order for the items in wx.dataview.TreeListCtrl.
New in version 2.9.3.
See also
Default constructor. |
|
Pure virtual function which must be overridden to define sort order. |
wx.dataview.
TreeListItemComparator
(object)¶Possible constructors:
TreeListItemComparator()
Class defining sort order for the items in TreeListCtrl.
__init__
(self)¶Default constructor.
Notice that this class is not copiable, comparators are not passed by value.
Compare
(self, treelist, column, first, second)¶Pure virtual function which must be overridden to define sort order.
The comparison function should return negative, null or positive value depending on whether the first item is less than, equal to or greater than the second one. The items should be compared using their values for the given column.
treelist (wx.dataview.TreeListCtrl) – The control whose contents is being sorted.
column – The column of this control used for sorting.
first (wx.dataview.TreeListItem) – First item to compare.
second (wx.dataview.TreeListItem) – Second item to compare.
int
A negative value if the first item is less than (i.e. should appear above) the second one, zero if the two items are equal or a positive value if the first item is greater than (i.e. should appear below) the second one.