]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/demo/wxTreeCtrl.py
Fix for export warning when compiling a DLL.
[wxWidgets.git] / wxPython / demo / wxTreeCtrl.py
index 03a346d05fa48359c314cc100803bc01fb93a185..ed5adc05e6aca290f7810f2155e3d2576ad25495 100644 (file)
@@ -31,6 +31,7 @@ class TestTreeCtrlPanel(wxPanel):
 
         self.tree = MyTreeCtrl(self, tID, wxDefaultPosition, wxDefaultSize,
                                wxTR_HAS_BUTTONS | wxTR_EDIT_LABELS# | wxTR_MULTIPLE
+                               #| wxTR_HIDE_ROOT
                                , self.log)
 
 
@@ -80,15 +81,15 @@ class TestTreeCtrlPanel(wxPanel):
         EVT_RIGHT_UP(self.tree, self.OnRightUp)
 
 
+
     def OnRightClick(self, event):
         pt = event.GetPosition();
         item, flags = self.tree.HitTest(pt)
-        self.log.WriteText("OnRightClick: %s, %s\n" % (self.tree.GetItemText(item),
-                                                       type(item)))
+        self.log.WriteText("OnRightClick: %s, %s, %s\n" %
+                           (self.tree.GetItemText(item), type(item), item.__class__))
         self.tree.SelectItem(item)
 
 
-
     def OnRightUp(self, event):
         pt = event.GetPosition();
         item, flags = self.tree.HitTest(pt)
@@ -165,15 +166,15 @@ def runTest(frame, nb, log):
 
 
 
+overview = """\
+A tree control presents information as a hierarchy, with items that may be expanded to show further items. Items in a tree control are referenced by wxTreeItemId handles.
 
+"""
 
 
 
+if __name__ == '__main__':
+    import sys,os
+    import run
+    run.main(['', os.path.basename(sys.argv[0])])
 
-
-
-
-overview = """\
-A tree control presents information as a hierarchy, with items that may be expanded to show further items. Items in a tree control are referenced by wxTreeItemId handles.
-
-"""