Hi,
I am using latest wxPython 2.9.3.1 on Windows VIsta (but the issue appears on XP and 7). When I create a wx.Notebook with tabs on top background of the pages is white but when I create it with tabs on the bottom the page background is grey. The issue seems to be connected with themes. Is that a bug or a feature? Is there a way to receive exactly the same look in both cases?
I noticed a switch “msw.notebook.themed-background”. When I turn this off by wx.SystemOptions.SetOptionInt(“msw.notebook.themed-background”, 0) and tabs are on the bottom the background gets white but tab titles remain gray. The switch doesn’t seem to do anything when tabs are on top.
Hi,
I am using latest wxPython 2.9.3.1 on Windows VIsta (but the issue
appears on XP and 7). When I create a wx.Notebook with tabs on top
background of the pages is white but when I create it with tabs on the
bottom the page background is grey. The issue seems to be connected with
themes.
Correct. Since XP the native notebook widget doesn't officially support having the tabs anywhere but the top, so we have to disable themes for the notebook widget when any of the other styles are used.
Is that a bug or a feature? Is there a way to receive exactly
the same look in both cases?
Not really. You could set the background color of the notebook pages yourself, but since the theme may actually be using a texture you may not be able to get an exact match. That won't do anything for the tabs themselves of course.
I noticed a switch "msw.notebook.themed-background". When I turn this
off by wx.SystemOptions.SetOptionInt("msw.notebook.themed-background",
0) and tabs are on the bottom the background gets white but tab titles
remain gray. The switch doesn't seem to do anything when tabs are on top.
It looks like that just turns off the theming of the page window, not the tabs. Using the wx.NB_NOPAGETHEME style should accomplish the same thing.