clr=self.toppanel.GetBackgroundColour()
self.datanotebook = wxNotebook(self, -1, style=0)
self.datanotebook.SetBackgroundColour(clr) # I'll try to set
for i in range(len(self.NBNames)):
nb=wxPanel(self.datanotebook, -1)
nb.SetBackgroundColour(clr)
self.datanotebook.AddPage(nb,self.NBNames[i])
self.NBObjs.append(nb)
sizer=wxBoxSizer(wxHORIZONTAL)
self.NBSizers.append(sizer)
nb.SetAutoLayout(1)
nb.SetSizer(sizer)
The toppanel's color is the Windows ButtonFace Color (silver).
But the NB and it's items are get White Color.
clr=self.toppanel.GetBackgroundColour()
self.datanotebook = wxNotebook(self, -1, style=0)
self.datanotebook.SetBackgroundColour(clr) # I'll try to set
for i in range(len(self.NBNames)):
nb=wxPanel(self.datanotebook, -1)
nb.SetBackgroundColour(clr)
self.datanotebook.AddPage(nb,self.NBNames[i])
self.NBObjs.append(nb)
sizer=wxBoxSizer(wxHORIZONTAL)
self.NBSizers.append(sizer)
nb.SetAutoLayout(1)
nb.SetSizer(sizer)
The toppanel's color is the Windows ButtonFace Color (silver).
But the NB and it's items are get White Color.
Why ? How I can set the color ?
What platform?
If on XP and themes are enabled then there is code in place to get some info from the theme engine and try and make the notebook and the pages and items in the notebook "look right." Personally I really dislike that "feature" but I don't think there is a way to turn it off other than removing the pythonw.exe.manifest file.
If you are on a non-Windows platform then it may be a similar issue. Either the platform itself or the active theme may not allow the change.
···
--
Robin Dunn
Software Craftsman http://wxPython.org Java give you jitters? Relax with wxPython!