X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1e4a197e4c60e461b8068b0619692ea083e30b8b..80a81a12af49ab6acdaf0b62f4aa55e56f45ac6d:/wxPython/demo/wxOGL.py diff --git a/wxPython/demo/wxOGL.py b/wxPython/demo/wxOGL.py index 17f0015899..042cd15721 100644 --- a/wxPython/demo/wxOGL.py +++ b/wxPython/demo/wxOGL.py @@ -4,10 +4,7 @@ from wxPython.ogl import * import images -#---------------------------------------------------------------------- -# This creates some pens and brushes that the OGL library uses. - -wxOGLInitialize() +##wxTrap() #---------------------------------------------------------------------- @@ -83,6 +80,7 @@ class DividedShape(wxDividedShape): def OnSizingEndDragLeft(self, pt, x, y, keys, attch): + print "***", self self.base_OnSizingEndDragLeft(pt, x, y, keys, attch) self.SetRegionSizes() self.ReformatRegions() @@ -106,7 +104,7 @@ class MyEvtHandler(wxShapeEvtHandler): def OnLeftClick(self, x, y, keys = 0, attachment = 0): shape = self.GetShape() - print shape.__class__ + print shape.__class__, shape.GetClassName() canvas = shape.GetCanvas() dc = wxClientDC(canvas) canvas.PrepareDC(dc) @@ -257,6 +255,11 @@ class TestWindow(wxShapeCanvas): #---------------------------------------------------------------------- def runTest(frame, nb, log): + # This creates some pens and brushes that the OGL library uses. + # It should be called after the app object has been created, but + # before OGL is used. + wxOGLInitialize() + win = TestWindow(nb, log, frame) return win