From: Alec B. <wry...@gm...> - 2012-02-01 04:57:15
|
I'm trying to display an ImageButton on top of an Image, and having some trouble with the button disappearing behind the Image from time to time. I know I'm asking for trouble by simply stacking these two assets, so its not really surprising. I tried dynamically setting the Image as a background image for the window, but haven't been able to get that to work. When working in straight wxPython, I do something like this: fname = "background_image.jpg" bmp = wx.Image(fname, wx.BITMAP_TYPE_ANY) self.buffer = wx.BitmapFromImage(bmp) dc = wx.BufferedDC(wx.ClientDC(self), self.buffer) self.Bind(wx.EVT_PAINT, self.OnPaint) def OnPaint(self, evt): dc = wx.BufferedPaintDC(self, self.buffer) Can anyone think of a way to achieve this in PythonCard? I'd rather not convert this project to straight wxPython if I can avoid it. |