mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2026-01-24 12:40:08 +01:00
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@73135 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
14 lines
401 B
Python
14 lines
401 B
Python
##Andrea Gavana
|
|
#!/usr/bin/env python
|
|
|
|
# This sample shows how to override OnCompareItems for wx.TreeCtrl.
|
|
# The overridden method simply compares lowercase item texts
|
|
|
|
def OnCompareItems(self, item1, item2):
|
|
"""Changes the sort order of the items in the tree control. """
|
|
|
|
t1 = self.GetItemText(item1)
|
|
t2 = self.GetItemText(item2)
|
|
|
|
return cmp(t1.lower(), t2.lower())
|