[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] wxPython and pygame - pygame window will not disappear



OK, this is ridiculous.  I'm going to write the program in wxPython.  It's a specialized paint program, so I want the good access to pixels that Pygame uses.  So far I've got some subwindows:

    def OnNewWindow(self, event):
            self.winCount = self.winCount + 1
            win = wx.MDIChildFrame(self, -1, "Image %d" % self.winCount)
            canvas = MyCanvas(win)
            win.Show(True)
class MyCanvas( wx.ScrolledWindow):
    def __init__(self, parent, id = -1, size = wx.DefaultSize):
        wx.ScrolledWindow.__init__(self, parent, id, (0, 0), size=size, style=wx.SUNKEN_BORDER)
        self.maxWidth  = 1000
        self.maxHeight = 1000
        self.SetBackgroundColour("WHITE")
        self.SetVirtualSize((self.maxWidth, self.maxHeight))
        self.SetScrollRate(20,20)

and I want to put Pygame Surfaces in.  Help?  This is technically related to Pygame :-).

Ian