I haven't had to do any GUI programming in a long time, so I might be being obtuse here, so please bear with me if this is a stupid question. I decided to use wxPython for a small hobby project, and I'm having trouble changing the background colour of the main window. I'm using Python 2.6.2 and wxPython 2.8.11.0 on Snow Leopard. Can anyone tell me what I'm doing wrong here? Or have I stumbled upon a bug of some sort? Here's a small sample that demonstrates the problem...
from wx import *
class MainFrame(Frame):
def __init__(self, parent, title):
Frame.__init__(self, parent, title=title)
self.Maximize()
self.cdatabase = ColourDatabase()
self.SetBackgroundStyle(BG_STYLE_CUSTOM)
self.SetOwnBackgroundColour(self.cdatabase.Find('BLACK'))
self.Show(True)
self.ClearBackground()
app = App(False)
frame = MainFrame(None, 'a title')
app.MainLoop()