]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/demo/TreeCtrl.py
use wxUSE_DATEPICKCTRL
[wxWidgets.git] / wxPython / demo / TreeCtrl.py
index 78cb5231e64453e365a3086465274764a558a044..5c53d1931fe38bb185f4952a84b09581153f10dd 100644 (file)
@@ -116,7 +116,7 @@ class TestTreeCtrlPanel(wx.Panel):
             # Lets just see what's visible of its children
             cookie = 0
             root = event.GetItem()
             # Lets just see what's visible of its children
             cookie = 0
             root = event.GetItem()
-            (child, cookie) = self.tree.GetFirstChild(root, cookie)
+            (child, cookie) = self.tree.GetFirstChild(root)
 
             while child.IsOk():
                 self.log.WriteText("Child [%s] visible = %d" %
 
             while child.IsOk():
                 self.log.WriteText("Child [%s] visible = %d" %
@@ -128,7 +128,8 @@ class TestTreeCtrlPanel(wx.Panel):
 
 
     def OnEndEdit(self, event):
 
 
     def OnEndEdit(self, event):
-        self.log.WriteText("OnEndEdit\n")
+        self.log.WriteText("OnEndEdit: %s %s\n" %
+                           (event.IsEditCancelled(), event.GetLabel()) )
         # show how to reject edit, we'll not allow any digits
         for x in event.GetLabel():
             if x in string.digits:
         # show how to reject edit, we'll not allow any digits
         for x in event.GetLabel():
             if x in string.digits:
@@ -198,5 +199,5 @@ wx.TreeItemId handles.
 if __name__ == '__main__':
     import sys,os
     import run
 if __name__ == '__main__':
     import sys,os
     import run
-    run.main(['', os.path.basename(sys.argv[0])])
+    run.main(['', os.path.basename(sys.argv[0])] + sys.argv[1:])