Phoenix Logo

phoenix_title wx.dataview.TreeListItemComparator

Class defining sort order for the items in wx.dataview.TreeListCtrl.

New in version 2.9.3.


class_hierarchy Class Hierarchy

Inheritance diagram for class TreeListItemComparator:


method_summary Methods Summary

__init__ Default constructor.
Compare Pure virtual function which must be overridden to define sort order.

api Class API



class wx.dataview.TreeListItemComparator(object)

Possible constructors:

TreeListItemComparator()

Class defining sort order for the items in TreeListCtrl.


Methods



__init__(self)

Default constructor.

Notice that this class is not copyable, 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.

Parameters:
Return type:

int

Returns:

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.