def runTest(frame, nb, log):
#win = TestGLCanvas(nb)
+ #win.SetFocus()
#return win
win = wxFrame(frame, -1, "GL Cube", wxDefaultPosition, wxSize(400,300))
canvas = TestGLCanvas(win)
wxGLCanvas.__init__(self, parent, -1)
EVT_ERASE_BACKGROUND(self, self.OnEraseBackground)
self.init = false
+ EVT_CHAR(self, self.MyOnChar)
+
+ def MyOnChar(self, event):
+ print "MyOnChar"
def OnEraseBackground(self, event):
pass # Do nothing, to avoid flashing.
dc = wxPaintDC(self)
ctx = self.GetContext()
- if ctx == "NULL": return
+ if not ctx: return
self.SetCurrent()
+#----------------------------------------------------------------------