]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/demo/wxMVCTree.py
wxBell --> wx.Bell
[wxWidgets.git] / wxPython / demo / wxMVCTree.py
index 17d71cd2112f8b2dadcddc657d7e5db5e07a5635..79ad083a8571dd5cc6228366f73af0584a53a89d 100644 (file)
@@ -1,8 +1,21 @@
-
-import sys, os
-from wxPython.wx import *
-from wxPython.lib.mvctree import *
-
+# 11/20/2003 - Jeff Grimmett (grimmtooth@softhome.net)
+#
+# o Updated for wx namespace
+# 
+# 11/30/2003 - Jeff Grimmett (grimmtooth@softhome.net)
+#
+# o Library must be updated for this to run.
+# 
+# 12/20/2003 - Jeff Grimmett (grimmtooth@softhome.net)
+#
+# o wxMVCTree -> MVCTree
+#
+
+import  os
+import  sys
+
+import  wx
+import  wx.lib.mvctree  as  tree
 
 logger = None
 def selchanging(evt):
@@ -23,24 +36,26 @@ def delitem(evt):
     logger.write("Delete\n")
 
 def runTest(frame, nb, log):
-    #f = wxFrame(frame, -1, "wxMVCTree", wxPoint(0,0), wxSize(200,500))
+    #f = wx.Frame(frame, -1, "MVCTree", (0,0), (200,500))
     global logger
     logger = log
-    p = wxMVCTree(nb, -1)
-    #f = wxFrame(frame, -1, "wxMVCTree")
-    #p = wxMVCTree(f, -1)
+    p = tree.MVCTree(nb, -1)
+    #f = wx.Frame(frame, -1, "MVCTree")
+    #p = tree.MVCTree(f, -1)
     p.SetAssumeChildren(True)
-    p.SetModel(LateFSTreeModel(os.path.normpath(os.getcwd() + os.sep +'..')))
+    p.SetModel(tree.LateFSTreeModel(os.path.normpath(os.getcwd() + os.sep +'..')))
+
     #Uncomment this to enable live filename editing!
 #    p.AddEditor(FileEditor(p))
+
     p.SetMultiSelect(True)
-    EVT_MVCTREE_SEL_CHANGING(p, p.GetId(), selchanging)
-    EVT_MVCTREE_SEL_CHANGED(p, p.GetId(), selchanged)
-    EVT_MVCTREE_ITEM_EXPANDED(p, p.GetId(), expanded)
-    EVT_MVCTREE_ITEM_COLLAPSED(p, p.GetId(), closed)
-    EVT_MVCTREE_ADD_ITEM(p, p.GetId(), add)
-    EVT_MVCTREE_DELETE_ITEM(p, p.GetId(), delitem)
-    EVT_MVCTREE_KEY_DOWN(p, p.GetId(), key)
+    tree.EVT_MVCTREE_SEL_CHANGING(p, p.GetId(), selchanging)
+    tree.EVT_MVCTREE_SEL_CHANGED(p, p.GetId(), selchanged)
+    tree.EVT_MVCTREE_ITEM_EXPANDED(p, p.GetId(), expanded)
+    tree.EVT_MVCTREE_ITEM_COLLAPSED(p, p.GetId(), closed)
+    tree.EVT_MVCTREE_ADD_ITEM(p, p.GetId(), add)
+    tree.EVT_MVCTREE_DELETE_ITEM(p, p.GetId(), delitem)
+    tree.EVT_MVCTREE_KEY_DOWN(p, p.GetId(), key)
 
     return p
     #frame.otherWin = f
@@ -48,11 +63,9 @@ def runTest(frame, nb, log):
     #return None
 
 
-
-
 overview = """\
 
-wxMVCTree is a control which handles hierarchical data. It is
+MVCTree is a control which handles hierarchical data. It is
 constructed in model-view-controller architecture, so the display of
 that data, and the content of the data can be changed greatly without
 affecting the other parts.
@@ -71,9 +84,6 @@ demo, to avoid accidentally renaming files!
 """
 
 
-
-
-
 if __name__ == '__main__':
     import sys,os
     import run