]> git.saurik.com Git - wxWidgets.git/blobdiff - utils/wxPython/demo/Main.py
Optimized drawing code in OnMouse() for freehand drawing.
[wxWidgets.git] / utils / wxPython / demo / Main.py
index fea3339ceb8cffc59e0eab2b525628907f8d869c..6b526172343868b241051238eaa7cc72dac80577 100644 (file)
@@ -137,6 +137,7 @@ class wxPythonDemo(wxFrame):
             tID = wxNewId()
             self.treeMap = {}
             self.tree = wxTreeCtrl(splitter, tID)
+            #self.tree.SetBackgroundColour(wxNamedColour("Pink"))
             root = self.tree.AddRoot("Overview")
             firstChild = None
             for item in _treeList:
@@ -276,6 +277,7 @@ class wxPythonDemo(wxFrame):
                     self.nb.AddPage(self.window, 'Demo')
                     #self.nb.ResizeChildren()
                     self.nb.SetSelection(2)
+                    #self.window.Refresh()
                     #self.nb.ResizeChildren()
                     #if self.window.GetAutoLayout():
                     #    self.window.Layout()
@@ -382,6 +384,11 @@ class MyApp(wxApp):
 #---------------------------------------------------------------------------
 
 def main():
+    try:
+        demoPath = os.path.split(__file__)[0]
+        os.chdir(demoPath)
+    except:
+        pass
     app = MyApp(0)
     app.MainLoop()