]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/demo/wxTreeCtrl.py
Applied patch #403856 (utilscmn.cpp should translate special key names)
[wxWidgets.git] / wxPython / demo / wxTreeCtrl.py
index 17fcfe835957eb570692f559009d7e0bb4041fbb..f16c48c6cfde32fd7da6981e82d874e9500f01e8 100644 (file)
@@ -6,13 +6,14 @@ import string
 #---------------------------------------------------------------------------
 
 class MyTreeCtrl(wxTreeCtrl):
-    def __init__(self, parent, id, pos, size, style):
+    def __init__(self, parent, id, pos, size, style, log):
         wxTreeCtrl.__init__(self, parent, id, pos, size, style)
-
+        self.log = log
 
     def OnCompareItems(self, item1, item2):
         t1 = self.GetItemText(item1)
         t2 = self.GetItemText(item2)
+        self.log.WriteText('compare: ' + t1 + '<>' + t2 + '\n')
         if t1 < t2: return -1
         if t1 == t2: return 0
         return 1
@@ -29,7 +30,8 @@ class TestTreeCtrlPanel(wxPanel):
         tID = NewId()
 
         self.tree = MyTreeCtrl(self, tID, wxDefaultPosition, wxDefaultSize,
-                               wxTR_HAS_BUTTONS | wxTR_EDIT_LABELS)# | wxTR_MULTIPLE)
+                               wxTR_HAS_BUTTONS | wxTR_EDIT_LABELS# | wxTR_MULTIPLE
+                               , self.log)
 
         #import images
         #il = wxImageList(16, 16)