]> git.saurik.com Git - wxWidgets.git/commitdiff
demo updates
authorRobin Dunn <robin@alldunn.com>
Wed, 15 May 2002 05:05:02 +0000 (05:05 +0000)
committerRobin Dunn <robin@alldunn.com>
Wed, 15 May 2002 05:05:02 +0000 (05:05 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15567 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

wxPython/demo/PyCrust.py
wxPython/demo/run.py
wxPython/demo/wxScrolledWindow.py
wxPython/demo/wxStyledTextCtrl_1.py

index 3c7884151f876a077088b9258061868b693a953b..feaf9df92ec468ae178d88dee9e4e4812f36d91c 100644 (file)
@@ -14,3 +14,9 @@ def runTest(frame, nb, log):
 #----------------------------------------------------------------------
 
 overview = shell.__doc__
+
+
+if __name__ == '__main__':
+    import run
+    run.main(['', 'PyCrust'])
+
index 09cc9488dd899c5ea06cab7871c9512be35edc81..d2eac71dae9a031adfe9a80e5be2b2aed6abc1e7 100755 (executable)
@@ -33,7 +33,8 @@ class RunDemoApp(wxApp):
     def __init__(self, name, module):
         self.name = name
         self.demoModule = module
-        wxApp.__init__(self, 0)
+        wxApp.__init__(self, wxPlatform == "__WXMAC__")
+
 
     def OnInit(self):
         wxInitAllImageHandlers()
index ad1fa7becad7bd8fc19afb09d863fb3f0e6a4b04..31a388a11e34877d25e18f4443b297251930127f 100644 (file)
@@ -19,11 +19,6 @@ class MyCanvas(wxScrolledWindow):
         self.drawing = false
 
         self.SetBackgroundColour("WHITE")
-        EVT_LEFT_DOWN(self, self.OnLeftButtonEvent)
-        EVT_LEFT_UP(self,   self.OnLeftButtonEvent)
-        EVT_MOTION(self,    self.OnLeftButtonEvent)
-        EVT_PAINT(self, self.OnPaint)
-
         self.SetCursor(wxStockCursor(wxCURSOR_PENCIL))
         bmp = images.getTest2Bitmap()
         mask = wxMaskColour(bmp, wxBLUE)
@@ -40,6 +35,11 @@ class MyCanvas(wxScrolledWindow):
             dc.Clear()
             self.DoDrawing(dc)
 
+        EVT_LEFT_DOWN(self, self.OnLeftButtonEvent)
+        EVT_LEFT_UP(self,   self.OnLeftButtonEvent)
+        EVT_MOTION(self,    self.OnLeftButtonEvent)
+        EVT_PAINT(self, self.OnPaint)
+
 
     def getWidth(self):
         return self.maxWidth
index ed9a403f722c5672b16e79a2433de8910626328b..4cbdddfecba8a7624f03a3beed39e72ccdcda6b1 100644 (file)
@@ -264,12 +264,16 @@ be helpful.
 
 
 
-if __name__ == '__main__':
-    import sys
-    app = wxPySimpleApp()
-    frame = wxFrame(None, -1, "Tester...", size=(640, 480))
-    win = runTest(frame, frame, sys.stdout)
-    frame.Show(true)
-    app.MainLoop()
+## if __name__ == '__main__':
+##     import sys
+##     app = wxPySimpleApp()
+##     frame = wxFrame(None, -1, "Tester...", size=(640, 480))
+##     win = runTest(frame, frame, sys.stdout)
+##     frame.Show(true)
+##     app.MainLoop()
+
 
+if __name__ == '__main__':
+    import run
+    run.main(['', 'wxStyledTextCtrl_1'])