+ win = wx.MDIChildFrame(self, -1, "Child Window: %d" % self.winCount)
+ canvas = ScrolledWindow.MyCanvas(win)
+ win.Show(True)
+
+
+ def OnEraseBackground(self, evt):
+ dc = evt.GetDC()
+
+ if not dc:
+ dc = wx.ClientDC(self.GetClientWindow())
+
+ # tile the background bitmap
+ sz = self.GetClientSize()
+ w = self.bg_bmp.GetWidth()
+ h = self.bg_bmp.GetHeight()
+ x = 0
+
+ while x < sz.width:
+ y = 0
+
+ while y < sz.height:
+ dc.DrawBitmap(self.bg_bmp, x, y)
+ y = y + h
+
+ x = x + w